Snippets created by Samuel Bosch

  • DBSCAN

    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 this

    Posted: 4 years ago by Samuel Bosch

  • mapi with 64bit integers

    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 this

    Posted: 4 years ago by Samuel Bosch

  • Convert integers to positive values

    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 this

    Posted: 4 years ago by Samuel Bosch

  • BitArray to Sequence

    Convert a BitArray to a sequence.

    1 people like this

    Posted: 4 years ago by Samuel Bosch

  • Azimuthal equidistant projection with measures

    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 this

    Posted: 3 years ago by Samuel Bosch

  • Convert booleans to bits and back

    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 this

    Posted: 3 years ago by Samuel Bosch