KNeighbor
K-Neighbor result
Operations
Compare
Compares neighbors
method : public : Compare(rhs:System.Compare) ~ IntParameters
| 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() ~ StringReturn
| Type | Description |
|---|---|
| String | category label |
GetDistance
Get the distance
method : public : GetDistance() ~ FloatReturn
| Type | Description |
|---|---|
| Float | distance |
HashID
Returns a unique hash ID for a boolean
method : public : HashID() ~ IntReturn
| 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() ~ StringReturn
| Type | Description |
|---|---|
| String | string representation of the neighbor |