|
CPPDescent 80d9539
(with uncommitted changes)
A C++ KNN-Graph creation library
|
Implementation of the cppdescent library. More...
#include "cppdescent/cppdescent.hpp"#include <gsl/gsl_blas.h>#include <gsl/gsl_vector.h>#include <omp.h>#include <cmath>#include <cstdint>#include <iostream>
Classes | |
| struct | sets |
Functions | |
| void | destroyEdges (GraphVertexPair *pair) |
| Graph * | sampleGraph (Vector *data, int K) |
| Creates a random graph, where each vertex has K random neighbors. | |
| int | updateNN (Graph *graph, int K, Pointer u1, Pointer u2, float dist, DistanceFunc distance) |
| struct sets | getSets (Vector *neighbors, int K, float rho) |
| Get the Sets object. | |
Variables | |
| bool | verbose = true |
Implementation of the cppdescent library.
Get the Sets object.
Returns a sets struct containing a vector pointer to the new[v] set and another to the old[v] set.
The first contains rho*K of direct neighbors with their flag equal to true and rho*K reverse neighbors with true. In other words, it contains 2*rho*K neighbors with flag = true.
The second contains all of the direct neighbors with flag = false, which in the worst case will be K, and rho*K of the reverse neighbors with flag = false. In other words, K + rho*K neighbors with flag = false.
| neighbors | |
| K | |
| rho |