Density-based spatial clustering of applications with noise (DBSCAN) is a data clustering algorithm. For more information see http://en.wikipedia.org/wiki/DBSCAN. The implementation is based on the pseudocode in the article and the following C# code http://www.c-sharpcorner.com/uploadfile/b942f9/implementing-the-dbscan-algorithm-using-C-Sharp/ The implementation is not very functional but does the job. Added pwd by ignorance, the password is "fssnip" (without quotes)
1 people like thisPosted: 5 years ago by Samuel Bosch
A version of mapi for very long sequences that uses long integers instead of regular integers. I didn't use a mutable variable because of this http://stackoverflow.com/questions/1480582/the-mutable-variable-i-is-used-in-an-invalid-way
4 people like thisPosted: 5 years ago by Samuel Bosch
Convert negative and positive integers to a positive value by using an overlap and interleave scheme (more info: http://en.wikipedia.org/wiki/Golomb_coding).
1 people like thisPosted: 5 years ago by Samuel Bosch
Convert a BitArray to a sequence.
1 people like thisPosted: 4 years ago by Samuel Bosch
Simple version of the azimuthal equidistant projection (see also http://fssnip.net/lA) but with measures. This avoids mixing of degrees and radians and longitudes/x and latitudes/y
2 people like thisPosted: 4 years ago by Samuel Bosch
Convert an array of booleans to an array of bytes with 8 booleans packed in one byte. The reverse operation from a byte array to a boolean array is also provided.
1 people like thisPosted: 4 years ago by Samuel Bosch
Compute the great circle distance of 2 points
3 people like thisPosted: 5 years ago by Samuel Bosch
Count the number of bits in a bigint (System.Numerics.BigInteger) and a BitArray. Note that version 4 is the fastest.
1 people like thisPosted: 5 years ago by Samuel Bosch
Function to combine the values of a list of sequences into a sequence of lists where each list contains the nth element of the different sequences. It works like zip but for an arbitrary number of sequences and it returns lists instead of tuples. As with zip when one sequence is exhausted any remaining elements in the other sequences are ignored.
4 people like thisPosted: 4 years ago by Samuel Bosch
Simple and a more optimized implementation of the azimuthal equidistant projection. Input is expected in degrees.
3 people like thisPosted: 4 years ago by Samuel Bosch
Try get a value from a dictionary and return a default value when not found. I provided two version. Pick the one you like the most.
1 people like thisPosted: 4 years ago by Samuel Bosch
Small F# snippet on how to read 32-bit integers from a file at specific indexes.
2 people like thisPosted: 4 years ago by Samuel Bosch