Node2Proximity

References
public class Node2Proximity
Maintains settings and results for node proximity searches.

Constructors

Node2Proximity

#
public Node2Proximity(Node2 search_start, int search_start_index, int max_results, double min_distance, double max_distance)
Create a new instance with a specific search result count
search_start (Node2)Node to search from.
search_start_index (int)Index of base node (this index will be ignored during the search).
max_results (int)Maximum number of results to return.
min_distance (double)Minimum allowed distance for search results.
max_distance (double)Maximum allowed distance for search results.

Node2Proximity

#
public Node2Proximity(Node2 search_start, int search_start_index, int max_results)
Create a new instance with a specific search result count
search_start (Node2)Node to search from.
search_start_index (int)Index of base node (this index will be ignored during the search).
max_results (int)Maximum number of results to return.

Node2Proximity

#
public Node2Proximity(Node2 search_start, int search_start_index)
Create a new instance for a single result.
search_start (Node2)Node to search from.
search_start_index (int)Index of base node (this index will be ignored during the search).

Fields

m_base

#
protected Node2 m_base

m_base_index

#
protected int m_base_index

m_cur_count

#
protected int m_cur_count

m_D

#
protected List<double> m_D

m_I

#
protected List<int> m_I

m_max_2

#
protected double m_max_2

m_max_count

#
protected int m_max_count

m_max_distance

#
protected double m_max_distance

m_min_2

#
protected double m_min_2

m_min_distance

#
protected double m_min_distance

Properties

CurrentCount

#
public int CurrentCount { get; }
Gets the number of results currently stored.

DistanceList

#
public List<double> DistanceList { get; }
Gets a list representing the sorted distances in the current solution.

FurthestDistance

#
public double FurthestDistance { get; }
Gets the distance to the furthest point in the current solution.

FurthestDistanceSquared

#
public double FurthestDistanceSquared { get; }
Gets the squared distance to the furthest point in the current solution.

FurthestPoint

#
public int FurthestPoint { get; }
Gets the index of the furthest point in the current solution.

IndexList

#
public List<int> IndexList { get; }
Gets a list representing the sorted indices in the current solution.

MaximumCount

#
public int MaximumCount { get; }
Gets the maximum result count.

MaxSearchRadius

#
public double MaxSearchRadius { get; }
Gets the maximum search radius

MaxSearchRadiusSquared

#
public double MaxSearchRadiusSquared { get; }
Gets the maximum search radius, squared

MinSearchRadius

#
public double MinSearchRadius { get; }
Gets the minimum search radius

MinSearchRadiusSquared

#
public double MinSearchRadiusSquared { get; }
Gets the minimum search radius, squared

NearestDistance

#
public double NearestDistance { get; }
Gets the distance to the nearest point in the current solution.

NearestDistanceSquared

#
public double NearestDistanceSquared { get; }
Gets the squared distance to the nearest point in the current solution.

NearestPoint

#
public int NearestPoint { get; }
Gets the index of the nearest point in the current solution.

Start

#
public Node2 Start { get; }
Gets the node from which the search is performed

StartIndex

#
public int StartIndex { get; }
Gets the index of the node from which the search is performed. If the search start node is not part of the search set, this index will be negative.

Methods

DistanceRange

#
public void DistanceRange(ref double d0, ref double d1)
Gets the squared minimum and maximum distance
d0 (ref double)Squared minimum distance in current solution.
d1 (ref double)Squared maximum distance in current solution.

RegisterNode

#
public bool RegisterNode(Node2 node, int index)
Rgister a new node with this collection.
node (Node2)Node to register
index (int)Index of node
True if node was accepted, false if the node is too far or too close.

ResetLists

#
public void ResetLists()
This function resets all search results and clears all caches. It is called once prior to a search operation.