K-Neighbor result
Implements: Compare
OperationsConstructor.
New(dist:Float, row:Int, cat:String)
Name | Type | Description |
---|---|---|
dist | Float | distance value |
row | Int | row index |
cat | String | category label |
Compares neighbors
method : public : Compare(rhs:System.Compare) ~ Int
Name | Type | Description |
---|---|---|
rhs | Compare | neighbor to compare |
Type | Description |
---|---|
Int | 0 if equal, -1 if types differ, 1 if equal |
Get the category label
method : public : GetCategory() ~ String
Type | Description |
---|---|
String | category label |
Get the distance
method : public : GetDistance() ~ Float
Type | Description |
---|---|
Float | distance |
Get the row index
method : public : GetRow() ~ Int
Type | Description |
---|---|
Int | row index |
Returns a unique hash ID for a boolean
method : public : HashID() ~ Int
Type | Description |
---|---|
Int | hash ID |
Returns a string representation of the neighbor
method : public : ToString() ~ String
Type | Description |
---|---|
String | string representation of the neighbor |