|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.knime.core.data.vector.bytevector.SparseByteVectorCellFactory
public class SparseByteVectorCellFactory
Used to created DataCells holding a SparseByteVector. As
data cells are read only this factory can be used to initialize the byte
vector accordingly and then create a data cell from it.
This factory also provides methods for performing basic operations
(min(ByteVectorValue, ByteVectorValue),
max(ByteVectorValue, ByteVectorValue), etc.) on two data cells
holding byte vectors.
| Constructor Summary | |
|---|---|
SparseByteVectorCellFactory(long length)
Initializes the factory to the specified length, all counts set to zero. |
|
SparseByteVectorCellFactory(SparseByteVector vector)
A copy of the specified vector is stored in the created byte vector cell. |
|
SparseByteVectorCellFactory(SparseByteVectorCell cell,
int startIdx,
int endIdx)
Initializes the vector from a subsequence of the specified cell. |
|
| Method Summary | |
|---|---|
void |
concatenate(SparseByteVectorCell bvCell)
Appends the argument at the end of the vector currently stored in the factory. |
SparseByteVectorCell |
createDataCell()
Creates a DataCell from the currently stored byte vector. |
void |
insert(SparseByteVectorCell bvCell)
Inserts the bytes at the lower positions of the current vector. |
static SparseByteVectorCell |
max(ByteVectorValue bv1,
ByteVectorValue bv2)
Creates a sparse byte vector cell containing the result of the max operation on the passed operands (that is each position holds the maximum of the values of the operands). |
static SparseByteVectorCell |
min(ByteVectorValue bv1,
ByteVectorValue bv2)
Creates a sparse byte vector cell containing the result of the min operation on the passed operands (that is each position holds the minimum of the values of the operands). |
void |
set(int byteIndex,
byte byteVal)
Sets the new count value at the specified index. |
static SparseByteVectorCell |
sum(ByteVectorValue bv1,
ByteVectorValue bv2)
Creates a sparse byte vector cell containing the sum of the passed operands (that is each position holds the sum of the values of the operands). |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SparseByteVectorCellFactory(long length)
length - the length of the count vectorpublic SparseByteVectorCellFactory(SparseByteVector vector)
vector - used to initialize the counts.
public SparseByteVectorCellFactory(SparseByteVectorCell cell,
int startIdx,
int endIdx)
startIdx to
endIdx - 1. The length of the resulting vector is
startIdx - endIdx.
cell - the byte vector cell to take the subsequence from.startIdx - the first byte to include in the created bit vectorendIdx - the first byte NOT to include in the result vector| Method Detail |
|---|
public void concatenate(SparseByteVectorCell bvCell)
bvCell - the data cell containing the vector to concatenate with
this.public void insert(SparseByteVectorCell bvCell)
bvCell - the data cell containing the vector to insert into this
public void set(int byteIndex,
byte byteVal)
byteIndex - the index of the count value to change.byteVal - the new value for the specified position.
ArrayIndexOutOfBoundsException - if the index is negative or larger
than or equal to the length of the vector.
IllegalArgumentException - if the count is negative or larger than
255
public static SparseByteVectorCell min(ByteVectorValue bv1,
ByteVectorValue bv2)
SparseByteVectorCells. All other implementations need to access
the byte counts through get/set methods and will probably perform poorly.
DenseByteVectorCellFactory.min(ByteVectorValue, ByteVectorValue)
for calculating the minimum on dense byte vector cells.
bv1 - the first operand to build the minimum with the secondbv2 - the second operand to build the minimum with the first one
public static SparseByteVectorCell max(ByteVectorValue bv1,
ByteVectorValue bv2)
SparseByteVectorCells. All other implementations need to access
the byte counts through get/set methods and will probably perform poorly.
DenseByteVectorCellFactory.max(ByteVectorValue, ByteVectorValue)
for calculating the maximum on dense byte vector cells.
bv1 - the first operand to build the maximum with the secondbv2 - the second operand to build the maximum with the first one
public static SparseByteVectorCell sum(ByteVectorValue bv1,
ByteVectorValue bv2)
SparseByteVectorCells. All other implementations need to access
the byte counts through get/set methods and will probably perform poorly.
DenseByteVectorCellFactory.sum(ByteVectorValue, ByteVectorValue)
for calculating the sum on dense byte vector cells.
bv1 - the first operand to build the sum with the secondbv2 - the second operand to build the sum with the first one
public SparseByteVectorCell createDataCell()
DataCell from the currently stored byte vector.
DataCell containing the current value of the vector
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||