|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.knime.core.data.DataCell
org.knime.core.data.vector.bytevector.SparseByteVectorCell
public class SparseByteVectorCell
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface org.knime.core.data.vector.bytevector.ByteVectorValue |
---|
ByteVectorValue.ByteVectorUtilityFactory |
Nested classes/interfaces inherited from interface org.knime.core.data.DataValue |
---|
DataValue.UtilityFactory |
Field Summary | |
---|---|
static DataType |
TYPE
Convenience access member for DataType.getType(SparseByteVectorCell.class) . |
Fields inherited from interface org.knime.core.data.vector.bytevector.ByteVectorValue |
---|
UTILITY |
Constructor Summary | |
---|---|
SparseByteVectorCell(SparseByteVector byteVector)
Use the SparseBitVectorCellFactory to create instances of this
cell. |
Method Summary | |
---|---|
int |
cardinality()
Returns the number of counts larger than zero stored in this vector. |
protected boolean |
equalsDataCell(DataCell dc)
Derived classes implement their specific equals function here. |
int |
get(long index)
Returns the count stored at the specified position. |
SparseByteVector |
getByteVectorCopy()
Returns a clone of the internal sparse byte vector. |
static DataCellSerializer<SparseByteVectorCell> |
getCellSerializer()
Returns the factory to read/write DataCells of this class from/to a DataInput/DataOutput. |
static Class<? extends DataValue> |
getPreferredValueClass()
Returns the preferred value class of this cell implementation. |
int |
hashCode()
This method must be implemented in order to ensure that two equal DataCell objects return the same hash code. |
boolean |
isEmpty()
Checks all counts and returns true if they are all zero. |
long |
length()
Returns the length of the byte vector. |
long |
nextCountIndex(long startIdx)
Finds the next count not equal to zero on or after the specified index. |
long |
nextZeroIndex(long startIdx)
Finds the next index whose value is zero on or after the specified index. |
long |
sumOfAllCounts()
Calculates the checksum, the sum of all counts stored. |
String |
toString()
Returns the String representation of this cell's value. |
Methods inherited from class org.knime.core.data.DataCell |
---|
equals, getType, isMissing |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final DataType TYPE
DataType.getType(SparseByteVectorCell.class)
.
DataType.getType(Class)
Constructor Detail |
---|
SparseByteVectorCell(SparseByteVector byteVector)
SparseBitVectorCellFactory
to create instances of this
cell.
byteVector
- the byte vector a copy of which is stored in this cell.Method Detail |
---|
public static final Class<? extends DataValue> getPreferredValueClass()
public static final DataCellSerializer<SparseByteVectorCell> getCellSerializer()
DataCell
protected boolean equalsDataCell(DataCell dc)
null
or a missing value,
to be of the same class like this.
equalsDataCell
in class DataCell
dc
- the cell to compare this to
true
if this is equal to the argument,
false
if notpublic int hashCode()
DataCell
objects return the same hash code.
hashCode
in class DataCell
DataCell
Object.hashCode()
,
DataCell.equals(java.lang.Object)
public String toString()
toString
in class DataCell
public int cardinality()
cardinality
in interface ByteVectorValue
public int get(long index)
get
in interface ByteVectorValue
index
- the index of the count to return
public boolean isEmpty()
isEmpty
in interface ByteVectorValue
public long length()
length
in interface ByteVectorValue
public long nextCountIndex(long startIdx)
nextCountIndex
in interface ByteVectorValue
startIdx
- the first index to look for non-zero counts. (It is
allowed to pass an index larger then the vector's length.)
public long nextZeroIndex(long startIdx)
nextZeroIndex
in interface ByteVectorValue
startIdx
- the first index to look for zero values.
public long sumOfAllCounts()
sumOfAllCounts
in interface ByteVectorValue
public SparseByteVector getByteVectorCopy()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |