|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.knime.core.data.vector.bytevector.DenseByteVectorCellFactory
public class DenseByteVectorCellFactory
Used to created DataCells holding a DenseByteVector. 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 | |
|---|---|
DenseByteVectorCellFactory(DenseByteVector vector)
A copy of the specified vector is stored in the created byte vector cell. |
|
DenseByteVectorCellFactory(DenseByteVectorCell cell,
int startIdx,
int endIdx)
Initializes the vector from a subsequence of the specified cell. |
|
DenseByteVectorCellFactory(int length)
Initializes the factory to the specified length, all counts set to zero. |
|
| Method Summary | |
|---|---|
void |
concatenate(DenseByteVectorCell bvCell)
Appends the argument at the end of the vector currently stored in the factory. |
DenseByteVectorCell |
createDataCell()
Creates a DataCell from the currently stored byte vector. |
void |
insert(DenseByteVectorCell bvCell)
Inserts the bytes at the lower positions of the current vector. |
static DenseByteVectorCell |
max(ByteVectorValue bv1,
ByteVectorValue bv2)
Creates a dense 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 DenseByteVectorCell |
min(ByteVectorValue bv1,
ByteVectorValue bv2)
Creates a dense 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 DenseByteVectorCell |
sum(ByteVectorValue bv1,
ByteVectorValue bv2)
Creates a dense 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 DenseByteVectorCellFactory(int length)
length - the length of the count vectorpublic DenseByteVectorCellFactory(DenseByteVector vector)
vector - used to initialize the counts.
public DenseByteVectorCellFactory(DenseByteVectorCell 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(DenseByteVectorCell bvCell)
bvCell - the data cell containing the vector to concatenate with
this.public void insert(DenseByteVectorCell 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 DenseByteVectorCell min(ByteVectorValue bv1,
ByteVectorValue bv2)
DenseByteVectorCells. All other implementations need to access
the byte counts through get/set methods and will probably perform poorly.
SparseByteVectorCellFactory.min(ByteVectorValue, ByteVectorValue)
for calculating the minimum on sparce 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 DenseByteVectorCell max(ByteVectorValue bv1,
ByteVectorValue bv2)
DenseByteVectorCells. All other implementations need to access
the byte counts through get/set methods and will probably perform poorly.
SparseByteVectorCellFactory.max(ByteVectorValue, ByteVectorValue)
for calculating the maximum on sparce 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 DenseByteVectorCell sum(ByteVectorValue bv1,
ByteVectorValue bv2)
DenseByteVectorCells. All other implementations need to access
the byte counts through get/set methods and will probably perform poorly.
SparseByteVectorCellFactory.sum(ByteVectorValue, ByteVectorValue)
for calculating the sum on sparce 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 DenseByteVectorCell 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 | |||||||||