class Newral::Classifier::NodeDistance
Attributes
distance[R]
node1[R]
node2[R]
Public Class Methods
new( node1, node2 )
click to toggle source
# File lib/newral/classifier/node_distance.rb, line 6 def initialize( node1, node2 ) @node1 = node1 @node2 = node2 @distance = Newral::Tools.euclidian_distance( node1.center, node2.center ) end
Public Instance Methods
<=>( other )
click to toggle source
# File lib/newral/classifier/node_distance.rb, line 12 def <=>( other ) self.distance <=> other.distance end