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