• MARS Website
  • Core API
  • SmartOpenHamburg API
  • Model Components API
  • Common API
Show / Hide Table of Contents
  • Mars.Common
    • GeoHash
    • GeoHashDecoder
    • GeohashDecodeResult
    • GeoHashEncoder
    • GeoHashPrecision
    • Hyperrectangle
    • InputHashHelper
    • PositionHelper
  • Mars.Common.Collections
    • BinaryArrayHeap<T>
    • DoubleBits
    • FibonacciHeap<T, TKey>
    • FibonacciHeapDoubleKey<T>
    • FibonacciHeapNode<T, TKey>
    • FibonacciHeapNodeDoubleKey<T>
    • HeapNode
    • IntervalSize
    • K2DTree<T>
    • K2dTreeNode<T>
    • KdTree
    • KdTree<T>
    • KdTreeBase<TNode>
    • KdTreeNode
    • KdTreeNode<T>
    • KdTreeNodeBase<TNode>
    • KdTreeNodeCollection<TNode>
    • KdTreeNodeList<T>
    • Key
    • Node<T>
    • NodeBase<T>
    • NodeDataContainer<T>
    • NodeDistance<TNode>
    • QuadTree<T>
    • Root<T>
    • TreeDataContainer<T>
  • Mars.Common.Collections.CritBit
    • ICritBitTree<TValue>
  • Mars.Common.Collections.Graph
    • EdgeData
    • GraphData
    • GraphSerializer
    • ISpatialGraph
    • KeyContainer
    • NodeData
    • SpatialGraph
    • SpatialGraphHelper
  • Mars.Common.Collections.Graph.Algorithms
    • AStar
    • CompressedPathDatabase
    • ContractionSearch
    • DepthLimitedTraversal
  • Mars.Common.Collections.Graph.Helper
    • INodeFinder
    • KdTreeNodeFinder
    • RunLengthEncoder
  • Mars.Common.Collections.KNNGraph
    • DefaultRandomGenerator
    • DistanceUtils
    • EventSources
    • EventSources.GraphBuildEventSource
    • EventSources.GraphSearchEventSource
    • IProgressReporter
    • IProvideRandomValues
    • KnnGraph<TItem, TDistance>
    • KnnGraph<TItem, TDistance>.KnnSearchResult
    • KnnGraph<TItem, TDistance>.Parameters
    • Node
    • ReverseComparer<T>
    • ReverseComparerExtensions
    • SelectionKind
    • TravelingCosts<TItem, TDistance>
  • Mars.Common.Compat
    • FormatDecoderAttribute
    • FormatEncoderAttribute
    • FormatHandlerAttribute
    • IntegerAttribute
    • NegativeIntegerAttribute
    • NonnegativeIntegerAttribute
    • NonpositiveIntegerAttribute
    • PositiveIntegerAttribute
  • Mars.Common.Data
    • DomainDataImporter
  • Mars.Common.Data.Providers
    • AscDataProvider
    • GeoJsonFeatureCollectionConverter
    • GeoJsonFeatureConverter
    • GeoJsonHelper
    • GeometryDataProvider
    • GraphMlProvider
    • HttpDataProvider
    • IDataProvider<TInput>
    • JsonFileDataProvider
    • JsonTextDataProvider
    • XmlFileDataProvider
    • XmlTextDataProvider
  • Mars.Common.Exceptions
    • DimensionMismatchException
    • ParseException
  • Mars.Common.IO
    • ExtensionMethods
    • FileClientUtils
    • FileKeys
    • HttpClientUtils
    • ObjectSerialize
    • Serializer
    • SerializerCompression
    • SparseFormat
    • SparseReader
    • SparseWriter
  • Mars.Common.IO.Attributes
    • SerializationBinderAttribute
    • SurrogateSelectorAttribute
  • Mars.Common.IO.Console
    • ChildProgressBar
    • IProgressBar
    • ProgressBar
    • ProgressBarBase
    • ProgressBarHeight
    • ProgressBarOptions
    • ProgressBarSimple
  • Mars.Common.IO.Csv
    • CsvAnalyzer
    • CsvReader
    • CsvReader.RecordEnumerator
    • CsvWriter
    • MissingFieldAction
    • ParseErrorAction
    • ValueTrimmingOptions
  • Mars.Common.IO.Events
    • ParseErrorEventArgs
  • Mars.Common.IO.Exceptions
    • MalformedCsvException
    • MissingFieldCsvException
  • Mars.Common.IO.Mapped
    • Context
    • DefaultArrayFactory
    • Extensions
    • IArrayFactory
    • ISerializableToStream
    • MappedAccessor<T>
    • MemoryMap
    • MemoryMap.CreateAccessorFunc<T>
    • MemoryMap.ReadFromDelegate<T>
    • MemoryMap.WriteToDelegate<T>
    • MemoryMapDelegates
    • MemoryMapDelegates.CreateAccessorFunc<T>
    • MemoryMapStream
  • Mars.Common.IO.Mapped.Accessors
    • MappedAccessorByte
    • MappedAccessorDouble
    • MappedAccessorInt16
    • MappedAccessorInt32
    • MappedAccessorInt64
    • MappedAccessorSingle
    • MappedAccessorUInt16
    • MappedAccessorUInt32
    • MappedAccessorUInt64
    • MappedAccessorVariable<T>
  • Mars.Common.IO.Mapped.Arrays
    • Array<T>
    • ArrayBase<T>
    • ArrayProfile
    • MappedArray<TMapped, T>
    • MappedArray<TMapped, T>.MapFrom
    • MappedArray<TMapped, T>.MapTo
    • MemoryArray<T>
    • VariableArray<T>
  • Mars.Common.IO.Mapped.Collections
    • MemoryBackedDictionary<TKey, TValue>
    • MemoryBackedList<T>
  • Mars.Common.IO.Mapped.Indexes
    • Index<T>
  • Mars.Common.IO.Mapped.Streams
    • CappedStream
  • Mars.Common.Socket
    • ByteOrder
    • CloseEventArgs
    • CloseStatusCode
    • CompressionMethod
    • ErrorEventArgs
    • Ext
    • MessageEventArgs
    • WebSocket
    • WebSocketException
    • WebSocketState
  • Mars.Common.Socket.Server
    • IWebSocketSession
    • WebHeaderCollection
    • WebSocketBehavior
    • WebSocketContext
    • WebSocketServer
    • WebSocketServiceHost
    • WebSocketServiceManager
    • WebSocketSessionManager
  • Mars.Numerics
    • Classes
    • Combinatorics
    • Constants
    • Distance
    • Elementwise
    • Jagged
    • MathematicsException
    • MathHelper
    • Matrix
    • MatrixOrder
    • MatrixType
    • Norm
    • Sort
    • Sorting
    • Sparse
    • Sparse<T>
    • Tools
    • Vector
    • VectorHelper
    • VectorType
  • Mars.Numerics.Comparers
    • ArrayComparer<T>
    • ComparerDirection
    • CustomComparer<T>
    • ElementComparer
    • ElementComparer<T>
    • GeneralComparer
    • StableComparer<T>
  • Mars.Numerics.Distances
    • Angular
    • Chebyshev
    • Cosine
    • Dirac<T>
    • Euclidean
    • Hamming
    • Hamming<T>
    • Haversine
    • Jaccard
    • Jaccard<T>
    • Kulczynski
    • Levenshtein
    • Levenshtein<T>
    • Manhattan
    • Matching
    • Minkowski
    • SquareEuclidean
    • Vincenty
    • Vincenty.Ellipsoid
  • Mars.Numerics.Distances.Base
    • IDistance<T>
    • IDistance<TFirst, TSecond>
    • IMetric<T>
    • ISimilarity<T, TU>
    • ISimilarity<T>
  • Mars.Numerics.Exceptions
    • DimensionMismatchException
    • NonPositiveDefiniteMatrixException
    • SingularMatrixException
  • Mars.Numerics.Formats
    • DefaultMatrixFormatProvider
    • IMatrixFormatProvider
    • MatrixFormatProviderBase
    • MatrixFormatter
    • OctaveMatrixFormatProvider
  • Mars.Numerics.Ranges
    • ByteRange
    • DoubleRange
    • FloatRange
    • IntRange
    • IRange<T>
  • Mars.Numerics.Statistics
    • ConstValueDistribution<T>
    • Distribution<T>
    • FastGaussianDistributionD
    • FastGaussianDistributionF
    • IDistribution
    • UniformDiscreteDistribution
    • UniformDistributionD
    • UniformDistributionF
  • Mars.Numerics.Statistics.Base
    • BinarySearch
    • DistributionBase
    • ISampleableDistribution<TObservations>
    • IUnivariateDistribution
    • IUnivariateDistribution<TObservation>
    • UnivariateDiscreteDistribution

Class KdTreeNodeCollection<TNode>

Collection of k-dimensional tree nodes.
Inheritance
System.Object
KdTreeNodeCollection<TNode>
Implements
System.Collections.Generic.ICollection<NodeDistance<TNode>>
System.Collections.Generic.IEnumerable<NodeDistance<TNode>>
System.Collections.IEnumerable
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Mars.Common.Collections
Assembly: Mars.Common.dll
Syntax
[Serializable]
public class KdTreeNodeCollection<TNode> : ICollection<NodeDistance<TNode>>, IEnumerable<NodeDistance<TNode>>, IEnumerable where TNode : KdTreeNodeBase<TNode>, IComparable<TNode>, IEquatable<TNode>
Type Parameters
Name Description
TNode The class type for the nodes of the tree.
Remarks
This class is used to store neighbor nodes when running one of the search algorithms for k-dimensional trees.

Constructors

| Improve this Doc View Source

KdTreeNodeCollection(Int32)

Creates a new KdTreeNodeCollection<TNode> with a maximum size.
Declaration
public KdTreeNodeCollection(int size)
Parameters
Type Name Description
System.Int32 size The maximum number of elements allowed in this collection.
Remarks
This class is used to store neighbor nodes when running one of the search algorithms for k-dimensional trees.
See Also
KdTree<T>
NodeDistance<TNode>

Properties

| Improve this Doc View Source

Capacity

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.
Declaration
public int Capacity { get; }
Property Value
Type Description
System.Int32
Remarks
This class is used to store neighbor nodes when running one of the search algorithms for k-dimensional trees.
See Also
KdTree<T>
NodeDistance<TNode>
| Improve this Doc View Source

Count

Gets the number of elements in this collection.
Declaration
public int Count { get; }
Property Value
Type Description
System.Int32
Remarks
This class is used to store neighbor nodes when running one of the search algorithms for k-dimensional trees.
See Also
KdTree<T>
NodeDistance<TNode>
| Improve this Doc View Source

Farthest

Gets the farthest node in the collection (with greatest distance).
Declaration
public TNode Farthest { get; }
Property Value
Type Description
TNode
Remarks
This class is used to store neighbor nodes when running one of the search algorithms for k-dimensional trees.
See Also
KdTree<T>
NodeDistance<TNode>
| Improve this Doc View Source

IsReadOnly

Gets a value indicating whether this instance is read only. For this collection, always returns false.
Declaration
public bool IsReadOnly { get; }
Property Value
Type Description
System.Boolean true if this instance is read only; otherwise, false.
Remarks
This class is used to store neighbor nodes when running one of the search algorithms for k-dimensional trees.
See Also
KdTree<T>
NodeDistance<TNode>
| Improve this Doc View Source

Item[Int32]

Gets the NodeDistance<TNode> at the specified index. Note: this method will iterate over the entire collection until the given position is found.
Declaration
public NodeDistance<TNode> this[int index] { get; }
Parameters
Type Name Description
System.Int32 index
Property Value
Type Description
NodeDistance<TNode>
Remarks
This class is used to store neighbor nodes when running one of the search algorithms for k-dimensional trees.
See Also
KdTree<T>
NodeDistance<TNode>
| Improve this Doc View Source

Maximum

Gets the maximum distance between a node in this collection and the query point.
Declaration
public double Maximum { get; }
Property Value
Type Description
System.Double
Remarks
This class is used to store neighbor nodes when running one of the search algorithms for k-dimensional trees.
See Also
KdTree<T>
NodeDistance<TNode>
| Improve this Doc View Source

Minimum

Gets the minimum distance between a node in this collection and the query point.
Declaration
public double Minimum { get; }
Property Value
Type Description
System.Double
Remarks
This class is used to store neighbor nodes when running one of the search algorithms for k-dimensional trees.
See Also
KdTree<T>
NodeDistance<TNode>
| Improve this Doc View Source

Nearest

Gets the nearest node in the collection (with smallest distance).
Declaration
public TNode Nearest { get; }
Property Value
Type Description
TNode
Remarks
This class is used to store neighbor nodes when running one of the search algorithms for k-dimensional trees.
See Also
KdTree<T>
NodeDistance<TNode>

Methods

| Improve this Doc View Source

Add(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.
Declaration
public bool Add(TNode value, double distance)
Parameters
Type Name Description
TNode value The node to be added.
System.Double distance The node distance.
Returns
Type Description
System.Boolean Returns true if the node has been added; false otherwise.
Remarks
This class is used to store neighbor nodes when running one of the search algorithms for k-dimensional trees.
See Also
KdTree<T>
NodeDistance<TNode>
| Improve this Doc View Source

Add(NodeDistance<TNode>)

Adds the specified item to this collection.
Declaration
public void Add(NodeDistance<TNode> item)
Parameters
Type Name Description
NodeDistance<TNode> item The item.
Remarks
This class is used to store neighbor nodes when running one of the search algorithms for k-dimensional trees.
See Also
KdTree<T>
NodeDistance<TNode>
| Improve this Doc View Source

AddFarthest(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.
Declaration
public bool AddFarthest(TNode value, double distance)
Parameters
Type Name Description
TNode value The node to be added.
System.Double distance The node distance.
Returns
Type Description
System.Boolean Returns true if the node has been added; false otherwise.
Remarks
This class is used to store neighbor nodes when running one of the search algorithms for k-dimensional trees.
See Also
KdTree<T>
NodeDistance<TNode>
| Improve this Doc View Source

Clear()

Removes all elements from this collection.
Declaration
public void Clear()
Remarks
This class is used to store neighbor nodes when running one of the search algorithms for k-dimensional trees.
See Also
KdTree<T>
NodeDistance<TNode>
| Improve this Doc View Source

Contains(NodeDistance<TNode>)

Determines whether this instance contains the specified item.
Declaration
public bool Contains(NodeDistance<TNode> item)
Parameters
Type Name Description
NodeDistance<TNode> item The object to locate in the collection. The value can be null for reference types.
Returns
Type Description
System.Boolean true if the item is found in the collection; otherwise, false.
Remarks
This class is used to store neighbor nodes when running one of the search algorithms for k-dimensional trees.
See Also
KdTree<T>
NodeDistance<TNode>
| Improve this Doc View Source

CopyTo(NodeDistance<TNode>[], Int32)

Copies the entire collection to a compatible one-dimensional System.Array, starting at the specified arrayIndex of the array .
Declaration
public void CopyTo(NodeDistance<TNode>[] array, int arrayIndex)
Parameters
Type Name Description
NodeDistance<TNode>[] array The one-dimensional System.Array that is the destination of the elements copied from tree. The System.Array must have zero-based indexing.
System.Int32 arrayIndex The zero-based index in array at which copying begins.
Remarks
This class is used to store neighbor nodes when running one of the search algorithms for k-dimensional trees.
See Also
KdTree<T>
NodeDistance<TNode>
| Improve this Doc View Source

GetEnumerator()

Returns an enumerator that iterates through this collection.
Declaration
public IEnumerator<NodeDistance<TNode>> GetEnumerator()
Returns
Type Description
System.Collections.Generic.IEnumerator<NodeDistance<TNode>> An System.Collections.IEnumerator object that can be used to iterate through the collection.
Remarks
This class is used to store neighbor nodes when running one of the search algorithms for k-dimensional trees.
See Also
KdTree<T>
NodeDistance<TNode>
| Improve this Doc View Source

Remove(NodeDistance<TNode>)

Not supported.
Declaration
public bool Remove(NodeDistance<TNode> item)
Parameters
Type Name Description
NodeDistance<TNode> item
Returns
Type Description
System.Boolean
Remarks
This class is used to store neighbor nodes when running one of the search algorithms for k-dimensional trees.
See Also
KdTree<T>
NodeDistance<TNode>
| Improve this Doc View Source

RemoveFarthest()

Removes the farthest tree node from this collection.
Declaration
public void RemoveFarthest()
Remarks
This class is used to store neighbor nodes when running one of the search algorithms for k-dimensional trees.
See Also
KdTree<T>
NodeDistance<TNode>
| Improve this Doc View Source

RemoveNearest()

Removes the nearest tree node from this collection.
Declaration
public void RemoveNearest()
Remarks
This class is used to store neighbor nodes when running one of the search algorithms for k-dimensional trees.
See Also
KdTree<T>
NodeDistance<TNode>

Explicit Interface Implementations

| Improve this Doc View Source

IEnumerable.GetEnumerator()

Returns an enumerator that iterates through this collection.
Declaration
IEnumerator IEnumerable.GetEnumerator()
Returns
Type Description
System.Collections.IEnumerator An System.Collections.IEnumerator object that can be used to iterate through the collection.
Remarks
This class is used to store neighbor nodes when running one of the search algorithms for k-dimensional trees.
See Also
KdTree<T>
NodeDistance<TNode>

Implements

System.Collections.Generic.ICollection<T>
System.Collections.Generic.IEnumerable<T>
System.Collections.IEnumerable

Extension Methods

Serializer.Save<T>(T, out Byte[], SerializerCompression)
Serializer.Save<T>(T, Stream, SerializerCompression)
Serializer.Save<T>(T, BinaryFormatter, Stream, SerializerCompression)
Serializer.Save<T>(T, String, SerializerCompression)
Serializer.Save<T>(T, String)
Matrix.Concatenate<T>(T, T[])
Matrix.Replace<T>(T, Object, Object)
Combinatorics.Subsets<T>(IEnumerable<T>, Boolean)
Combinatorics.Subsets<T>(IEnumerable<T>, Int32, Boolean)
Matrix.SetEquals<T>(IEnumerable<T>, IEnumerable<T>)
DomainDataImporter.Import(Object, InputConfiguration)
ObjectSerialize.Serialize(Object)
Matrix.IsEqual(Object, Object, Decimal, Decimal)

See Also

KdTree<T>
NodeDistance<TNode>
  • Improve this Doc
  • View Source
In This Article
Back to top Copyright © MARS GROUP. HAW Hamburg