Class KdTreeNodeBase<TNode>
Base class for K-dimensional tree nodes.
Inheritance
System.Object
Mars.Common.Core.Collections.SimpleTree.BinaryNode
Mars.Common.Core.Collections.SimpleTree.BinaryNode<TNode>
KdTreeNodeBase<TNode>
KdTreeNode<T>
Implements
System.IComparable<TNode>
System.IEquatable<TNode>
Inherited Members
Mars.Common.Core.Collections.SimpleTree.BinaryNode<TNode>.Left
Mars.Common.Core.Collections.SimpleTree.BinaryNode<TNode>.Right
Mars.Common.Core.Collections.SimpleTree.BinaryNode<TNode>.IsLeaf
Mars.Common.Core.Collections.SimpleTree.BinaryNode.NodeId
Mars.Common.Core.Collections.SimpleTree.BinaryNode.GetHashCode()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace: Mars.Common.Collections
Assembly: Mars.Common.dll
Syntax
[Serializable]
public class KdTreeNodeBase<TNode> : BinaryNode<TNode>, IComparable<TNode>, IEquatable<TNode> where TNode : KdTreeNodeBase<TNode>
Type Parameters
Name | Description |
---|---|
TNode | The class type for the nodes of the tree. |
Properties
| Improve this Doc View SourceAxis
Gets or sets the dimension index of the split. This value is a
index of the Position vector and as such should
be higher than zero and less than the number of elements in Position.
Declaration
[JsonProperty("axis")]
public int Axis { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
See Also
| Improve this Doc View SourcePosition
Gets or sets the position of
the node in spatial coordinates.
Declaration
[JsonProperty("position")]
public double[] Position { get; set; }
Property Value
Type | Description |
---|---|
System.Double[] |
See Also
Methods
| Improve this Doc View SourceCompareTo(TNode)
Compares the current object with another object of the same type.
Declaration
public int CompareTo(TNode other)
Parameters
Type | Name | Description |
---|---|---|
TNode | other | An object to compare with this object. |
Returns
Type | Description |
---|---|
System.Int32 |
A value that indicates the relative order of the objects being compared. The return value has the following
meanings: Value Meaning Less than zero This object is less than the other parameter.Zero This
object is equal to other . Greater than zero This object is greater than
other .
|
See Also
| Improve this Doc View SourceEquals(TNode)
Indicates whether the current object is equal to another object of the same type.
Declaration
public bool Equals(TNode other)
Parameters
Type | Name | Description |
---|---|---|
TNode | other | An object to compare with this object. |
Returns
Type | Description |
---|---|
System.Boolean |
true if the current object is equal to the other parameter; otherwise, false.
|
See Also
| Improve this Doc View SourceToString()
Returns a System.String that represents this instance.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System.String | A System.String that represents this instance. |
Overrides
System.Object.ToString()
See Also
Implements
System.IComparable<T>
System.IEquatable<T>