|
MayaFlux 0.2.0
Digital-First Multimedia Processing Framework
|
| EdgeList MayaFlux::Kinesis::k_nearest_neighbors | ( | const Eigen::MatrixXd & | points, |
| size_t | k | ||
| ) |
Compute K-nearest neighbors graph.
| points | Dx N matrix where each column is a point |
| k | Number of nearest neighbors per point |
For each point, connects it to its k nearest neighbors. Directed graph: point i connects to k neighbors, but neighbor j might not reciprocally connect to i.
Complexity: O(n² log k) with partial sort
Definition at line 46 of file ProximityGraphs.cpp.
References MayaFlux::Journal::Kinesis, MF_DEBUG, and MayaFlux::Journal::Runtime.
Referenced by generate_proximity_graph().
Here is the caller graph for this function: