﻿ NodeDistance(TNode) Structure

Node-distance pair.

Namespace:  Accord.Collections
Assembly:  Accord.MachineLearning (in Accord.MachineLearning.dll) Version: 3.8.0
Syntax
```[SerializableAttribute]
public struct NodeDistance<TNode> : IComparable<NodeDistance<TNode>>,
IEquatable<NodeDistance<TNode>>
where TNode : Object, IEquatable<TNode>
```

#### Type Parameters

TNode
The class type for the nodes of the tree.

The NodeDistanceTNode type exposes the following members.

Constructors
NameDescription
NodeDistanceTNode
Creates a new NodeDistanceTNode.
Top
Properties
NameDescription
Distance
Gets the distance of the node from the query point.
Node
Gets the node in this pair.
Top
Methods
NameDescription
CompareTo(Object)
Compares this instance to another node, returning an integer indicating whether this instance has a distance that is less than, equal to, or greater than the other node's distance.
CompareTo(NodeDistanceTNode)
Compares this instance to another node, returning an integer indicating whether this instance has a distance that is less than, equal to, or greater than the other node's distance.
Equals(Object)
Determines whether the specified Object is equal to this instance.
(Overrides ValueTypeEquals(Object).)
Equals(NodeDistanceTNode)
Determines whether the specified NodeDistanceTNode is equal to this instance.
GetHashCode
Returns a hash code for this instance.
(Overrides ValueTypeGetHashCode.)
GetType
Gets the Type of the current instance.
(Inherited from Object.)
ToString
Returns a String that represents this instance.
(Overrides ValueTypeToString.)
Top
Operators
NameDescription
Equality
Implements the equality operator.
GreaterThan
Implements the greater than operator.
Inequality
Implements the inequality operator.
LessThan
Implements the lesser than operator.
Top
Extension Methods
NameDescription
HasMethod
Checks whether an object implements a method with the given name.
(Defined by ExtensionMethods.)
IsEqual
Compares two objects for equality, performing an elementwise comparison if the elements are vectors or matrices.
(Defined by Matrix.)