|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectweka.core.pmml.Array
weka.core.pmml.SparseArray
public class SparseArray
Implementation of a sparse array. Extends Array.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class weka.core.pmml.Array |
|---|
Array.ArrayType |
| Method Summary | |
|---|---|
int |
index(int position)
Returns the index of the value stored at the given position |
boolean |
isSparse()
Overrides isSparse() in Array and always returns true. |
int |
locateIndex(int index)
Locates the greatest index that is not greater than the given index. |
int |
numNonZero()
Get the number of non-zero values in this sparse array |
int |
numValues()
Get the number of values in this array. |
String |
toString()
|
String |
value(int arrIndex)
Gets the value at index from the array. |
| Methods inherited from class weka.core.pmml.Array |
|---|
contains, contains, contains, contains, create, create, getType, isArray, valueDouble, valueFloat, valueInt, valueSparse, valueSparseDouble, valueSparseFloat, valueSparseInt, valueSparseString, valueString |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Method Detail |
|---|
public boolean isSparse()
isSparse in class Arraypublic int numValues()
numValues in class Arraypublic int numNonZero()
public int index(int position)
index in class Arrayposition - the position
public int locateIndex(int index)
public String value(int arrIndex)
throws Exception
value in class Arrayindex - the index of the value to get.
Exception - if index is out of bounds.public String toString()
toString in class Array
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||