Back to Adaptive Vision Library website
You are here: Start » Function Reference » Geometry 2D Relations » CreatePointGraph
CreatePointGraph
Creates a graph of points that lay close to each other.
Syntax
C++
C#
void avl::CreatePointGraph ( const atl::Array<avl::Point2D>& inPoints, const int inMaxRank, atl::Optional<float> inMaxDistance, atl::Optional<float> inMaxRelativeDistance, atl::Array<atl::Array<int> >& outGraph, atl::Array<atl::Array<float> >& outDistances, atl::Array<avl::Segment2D>& diagSegments )
Parameters
Name | Type | Range | Default | Description | |
---|---|---|---|---|---|
inPoints | const Array<Point2D>& | Input points | |||
inMaxRank | const int | 1 - | 8 | Maximum connections going out of one point | |
inMaxDistance | Optional<float> | 0.0 - | 10.0f | Maximum distance between adjacent point in the graph | |
inMaxRelativeDistance | Optional<float> | 1.0 - | NIL | Maximum distance in relation to the shortest distance for a point | |
outGraph | Array<Array<int> >& | Graph of points (adjacency list) | |||
outDistances | Array<Array<float> >& | Distances between adjacent points in the graph | |||
diagSegments | Array<Segment2D>& | Graph edges, useful for visualization |