MayaFlux 0.2.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ generate_proximity_graph()

EdgeList MayaFlux::Kinesis::generate_proximity_graph ( const Eigen::MatrixXd &  points,
const ProximityConfig config 
)

Generate proximity graph using specified mode.

Parameters
pointsDxN matrix where each column is a point
configConfiguration specifying mode and parameters
Returns
Edge list

Definition at line 308 of file ProximityGraphs.cpp.

311{
312 switch (config.mode) {
313
314 case ProximityMode::SEQUENTIAL:
315 return sequential_chain(points);
316
317 case ProximityMode::K_NEAREST:
318 return k_nearest_neighbors(points, config.k_neighbors);
319
320 case ProximityMode::RADIUS_THRESHOLD:
321 return radius_threshold_graph(points, config.radius);
322
323 case ProximityMode::MINIMUM_SPANNING_TREE:
324 return minimum_spanning_tree(points);
325
326 case ProximityMode::GABRIEL_GRAPH:
327 return gabriel_graph(points);
328
329 case ProximityMode::NEAREST_NEIGHBOR:
330 return nearest_neighbor_graph(points);
331
332 case ProximityMode::RELATIVE_NEIGHBORHOOD_GRAPH:
333 return relative_neighborhood_graph(points);
334
335 case ProximityMode::CUSTOM:
336 return custom_proximity_graph(points, config.custom_function);
337
338 default:
339 return {};
340 }
341}
EdgeList minimum_spanning_tree(const Eigen::MatrixXd &points)
Compute minimum spanning tree (Prim's algorithm)
EdgeList nearest_neighbor_graph(const Eigen::MatrixXd &points)
Compute nearest neighbor graph.
EdgeList custom_proximity_graph(const Eigen::MatrixXd &points, const std::function< EdgeList(const Eigen::MatrixXd &)> &connection_function)
Custom proximity graph via user function.
EdgeList k_nearest_neighbors(const Eigen::MatrixXd &points, size_t k)
Compute K-nearest neighbors graph.
EdgeList sequential_chain(const Eigen::MatrixXd &points)
Compute sequential chain graph.
EdgeList relative_neighborhood_graph(const Eigen::MatrixXd &points)
Compute relative neighborhood graph.
EdgeList radius_threshold_graph(const Eigen::MatrixXd &points, double radius)
Compute radius threshold graph.
EdgeList gabriel_graph(const Eigen::MatrixXd &points)
Compute Gabriel graph.
std::function< EdgeList(const Eigen::MatrixXd &)> custom_function

References CUSTOM, MayaFlux::Kinesis::ProximityConfig::custom_function, custom_proximity_graph(), gabriel_graph(), GABRIEL_GRAPH, K_NEAREST, k_nearest_neighbors(), MayaFlux::Kinesis::ProximityConfig::k_neighbors, minimum_spanning_tree(), MINIMUM_SPANNING_TREE, MayaFlux::Kinesis::ProximityConfig::mode, NEAREST_NEIGHBOR, nearest_neighbor_graph(), MayaFlux::Kinesis::ProximityConfig::radius, RADIUS_THRESHOLD, radius_threshold_graph(), relative_neighborhood_graph(), RELATIVE_NEIGHBORHOOD_GRAPH, SEQUENTIAL, and sequential_chain().

Referenced by MayaFlux::Nodes::GpuSync::TopologyGeneratorNode::regenerate_topology().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: