Source

nrnr / nrnr.h

Full commit
#ifndef __NRNR_H__
#define __NRNR_H__


#include <stdlib.h>
#include <inttypes.h>


//#define NRNRCHUNK UINT16_MAX
#define NRNRCHUNK 32000


typedef uint16_t index_t;

struct NrNrHood {
    size_t numPoints;
    size_t dimensions;
    size_t chunks;
    const float* points;
    index_t* indices;
    index_t* nextIndices;
};


struct NrNrHood* NrNrCreateNeighborhood(size_t numPoints, size_t dimensions, const float* points);
struct NrNrHood* NrNrFreeNeighborhood(struct NrNrHood* hood);

//size_t NrNrCountBlock(struct NrNrHood* hood, size_t most, float* minimum, float* maximum);
size_t NrNrSearchBlock(const struct NrNrHood* hood, size_t** results, const float* minimum, const float* maximum);
size_t* NrNrFreeResults(size_t* results);


#endif // __NRNR_H__