KDTreeNodeCollection(TNode) Class
Click or drag to resize
Accord.NET (logo)

KDTreeNodeCollectionTNode Class

Collection of k-dimensional tree nodes.
Inheritance Hierarchy
SystemObject
  Accord.CollectionsKDTreeNodeCollectionTNode

Namespace:  Accord.Collections
Assembly:  Accord.MachineLearning (in Accord.MachineLearning.dll) Version: 3.8.0
Syntax
[SerializableAttribute]
public class KDTreeNodeCollection<TNode> : IEnumerable
where TNode : KDTreeNodeBase<TNode>, IComparable<TNode>, IEquatable<TNode>
Request Example View Source

Type Parameters

TNode
The class type for the nodes of the tree.

The KDTreeNodeCollectionTNode type exposes the following members.

Constructors
  NameDescription
Public methodKDTreeNodeCollectionTNode
Creates a new KDTreeNodeCollectionTNode with a maximum size.
Top
Properties
  NameDescription
Public propertyCapacity
Gets or sets the maximum number of elements on this collection, if specified. A value of zero indicates this instance has no upper limit of elements.
Public propertyCount
Gets the number of elements in this collection.
Public propertyFarthest
Gets the farthest node in the collection (with greatest distance).
Public propertyIsReadOnly
Gets a value indicating whether this instance is read only. For this collection, always returns false.
Public propertyItem
Gets the NodeDistanceTNode at the specified index. Note: this method will iterate over the entire collection until the given position is found.
Public propertyMaximum
Gets the maximum distance between a node in this collection and the query point.
Public propertyMinimum
Gets the minimum distance between a node in this collection and the query point.
Public propertyNearest
Gets the nearest node in the collection (with smallest distance).
Top
Methods
  NameDescription
Public methodAdd(NodeDistanceTNode)
Adds the specified item to this collection.
Public methodAdd(TNode, Double)
Attempts to add a value to the collection. If the list is full and the value is more distant than the farthest node in the collection, the value will not be added.
Public methodAddFarthest
Attempts to add a value to the collection. If the list is full and the value is more distant than the farthest node in the collection, the value will not be added.
Public methodClear
Removes all elements from this collection.
Public methodContains
Determines whether this instance contains the specified item.
Public methodCopyTo
Copies the entire collection to a compatible one-dimensional Array, starting at the specified arrayIndex of the array.
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetEnumerator
Returns an enumerator that iterates through this collection.
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodRemove
Not supported.
Public methodRemoveFarthest
Removes the farthest tree node from this collection.
Public methodRemoveNearest
Removes the nearest tree node from this collection.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Extension Methods
  NameDescription
Public Extension MethodHasMethod
Checks whether an object implements a method with the given name.
(Defined by ExtensionMethods.)
Public Extension MethodIsEqual
Compares two objects for equality, performing an elementwise comparison if the elements are vectors or matrices.
(Defined by Matrix.)
Public Extension MethodSetEqualsNodeDistanceTNode
Compares two enumerables for set equality. Two enumerables are set equal if they contain the same elements, but not necessarily in the same order.
(Defined by Matrix.)
Public Extension MethodSortedNodeDistanceTNode
Sorts the elements of an entire one-dimensional array using the given comparison.
(Defined by Vector.)
Public Extension MethodTo(Type)Overloaded.
Converts an object into another type, irrespective of whether the conversion can be done at compile time or not. This can be used to convert generic types to numeric types during runtime.
(Defined by ExtensionMethods.)
Public Extension MethodToTOverloaded.
Converts an object into another type, irrespective of whether the conversion can be done at compile time or not. This can be used to convert generic types to numeric types during runtime.
(Defined by ExtensionMethods.)
Top
Remarks
This class is used to store neighbor nodes when running one of the search algorithms for k-dimensional trees.
See Also