Node2List

References
public class Node2List : IEnumerable<Node2>
Represents a list of (un)sorted nodes.

Constructors

Node2List

#
public Node2List()

Node2List

#
public Node2List()

Node2List

#
public Node2List()

Node2List

#
public Node2List()

Node2List

#
public Node2List(
Node2List
L
)

Properties

Capacity

#
Gets or sets the capacity of this list (i.e. the number of items this list can contain without resizing)
public int Capacity { get; set; }

Count

#
Get the number of nodes contained in this list.
public int Count { get; }

InternalList

#
public List<Node2> InternalList { get; set; }

Indexers

Node

#
Get or set a node. Be sure to call ExpireSequence() if your change affects sorting caches.
public Node2 this[
i
Index of node
] { get; set; }

Methods

Append

#
Add a single node to this list. This will reset all sorting flags and caches.
public void Append(
node
Node to add
)

AppendRange

#
Add a range of nodes to this list. This will reset all sorting flags and caches.
public void AppendRange(
nodes
Nodes to add
)

BinarySearch_I

#
public int BinarySearch_I(
i
)

BinarySearch_X

#
public int BinarySearch_X()

BinarySearch_Y

#
public int BinarySearch_Y()

BoundingBox

#
Compute the bounding box of all Nodes.
public bool BoundingBox(
GrowthFactor,
Factor by which to grow the boundingbox
ForceSquareLeaves,
If True, the boundingbox will be renormalized
ref double
x0,
ref double
x1,
ref double
y0,
ref double
y1
)

CreateTree

#
Create a VorNodeTree that contains all the Nodes in this list.
public Node2Tree CreateTree(
GrowthFactor,
Factor by which to grow the boundingbox of the topmost Leaf
SquareLeaves,
If True, the boundingbox will be normalized
GroupLimit
Maximum number of Nodes that are allowed to share a single Leaf
)

CullDuplicates

#
Removes all duplicates from this list. It also removes ALL null references.
public int CullDuplicates()

CullNullRefs

#
Remove all null references from this list.
public int CullNullRefs()

ExpireSequence

#
Call this method when you made a change that potentially invalidates the sorting flags and caches.
public void ExpireSequence()

GetEnumerator

#
public IEnumerator<Node2> GetEnumerator()

GetEnumerator1

#
public IEnumerator GetEnumerator1()

Insert

#
Insert a single node into this list. This will reset all sorting flags and caches.
public void Insert(
index,
Index at which to insert the node
node
Node to add
)

InsertRange

#
Insert a range of nodes into this list. This will reset all sorting flags and caches.
public void InsertRange(
index,
Index at which insertion begins
nodes
Nodes to add
)

JitterNodes

#
Randomly mutate all node locations
public void JitterNodes(
amount
Maximum distance to move in x and y directions.
)

NearestNodes

#
Perform a brute force node search for the N nearest nodes in the set.
public List<int> NearestNodes(
x,
X coordinate of search start.
y,
Y coordinate of search start.
N,
min_dist_squared = -1.7976931348623157E+308,
Minimum distance threshold, use any negative value to ignore this setting.
max_dist_squared = 1.7976931348623157E+308
Maximum distance threshold.
)
The N (or fewer) results, sorted by ascending distance.

NullifyDuplicates

#
Set all duplicate nodes to NULL
public int NullifyDuplicates()

Remove

#
Remove a single node from this list. Sorting flags are maintained but caches are destroyed.
public bool Remove(
node
Node to remove.
)
True on success, false if the provided Node does not occur in this list.

RemoveAt

#
Remove the node at the specified index. Sorting flags are maintained but caches are destroyed.
public void RemoveAt(
index
Index of node to remove
)

RenumberNodes

#
Reset all indices of all nodes by renumbering them in their current order. Nulls are ignored but they do affect the numbering.
public void RenumberNodes()

Sort

#
Sort the list using a sorting type.
public void Sort(
NodeListSort
type
Type of sorting algorithm.
)