All Bundles

KNeighbor

K-Neighbor result

Implements: Compare

Operations

New

Constructor.

New(dist:Float, row:Int, cat:String)
Parameters
NameTypeDescription
distFloatdistance value
rowIntrow index
catStringcategory label

Compare

Compares neighbors

method : public : Compare(rhs:System.Compare) ~ Int
Parameters
NameTypeDescription
rhsCompareneighbor to compare

Return
TypeDescription
Int0 if equal, -1 if types differ, 1 if equal

GetCategory

Get the category label

method : public : GetCategory() ~ String
Return
TypeDescription
Stringcategory label

GetDistance

Get the distance

method : public : GetDistance() ~ Float
Return
TypeDescription
Floatdistance

GetRow

Get the row index

method : public : GetRow() ~ Int
Return
TypeDescription
Introw index

HashID

Returns a unique hash ID for a boolean

method : public : HashID() ~ Int
Return
TypeDescription
Inthash ID

ToString

Returns a string representation of the neighbor

method : public : ToString() ~ String
Return
TypeDescription
Stringstring representation of the neighbor