public final class DenseMatrixRow extends BaseMatrixRow implements MatrixRow
Modifier and Type | Field and Description |
---|---|
static int |
HEADER |
static Float |
MAX_SCORE |
static Float |
MIN_SCORE |
static int |
PACKED_RANGE |
static Float |
SCORE_RANGE |
Constructor and Description |
---|
DenseMatrixRow(ValueConf vconf,
int[] colIds,
ByteBuffer buffer)
Wrap an existing byte buffer that contains a row.
|
DenseMatrixRow(ValueConf vconf,
int rowIndex,
int[] colIds,
float[] colVals) |
DenseMatrixRow(ValueConf vconf,
int rowIndex,
LinkedHashMap<Integer,Float> row) |
Modifier and Type | Method and Description |
---|---|
void |
createBuffer(int rowIndex,
int[] colIds,
short[] colVals) |
ByteBuffer |
getBuffer() |
protected int[] |
getColIds() |
int |
getColIndex(int i) |
float |
getColValue(int i) |
int |
getNumCols() |
short |
getPackedColValue(int i) |
int |
getRowIndex() |
ValueConf |
getValueConf() |
float[] |
getValues() |
asMap, asTroveMap, getIndexForId, getNorm, getValueForId
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
asMap, asTroveMap, getIndexForId, getNorm, getValueForId
public static final Float MIN_SCORE
public static final Float MAX_SCORE
public static final Float SCORE_RANGE
public static final int PACKED_RANGE
public static final int HEADER
public DenseMatrixRow(ValueConf vconf, int rowIndex, LinkedHashMap<Integer,Float> row)
public DenseMatrixRow(ValueConf vconf, int rowIndex, int[] colIds, float[] colVals)
public DenseMatrixRow(ValueConf vconf, int[] colIds, ByteBuffer buffer)
colIds
- buffer
- public void createBuffer(int rowIndex, int[] colIds, short[] colVals)
public final int getColIndex(int i)
getColIndex
in interface MatrixRow
getColIndex
in class BaseMatrixRow
public final float getColValue(int i)
getColValue
in interface MatrixRow
getColValue
in class BaseMatrixRow
public final short getPackedColValue(int i)
public final int getRowIndex()
getRowIndex
in interface MatrixRow
getRowIndex
in class BaseMatrixRow
public final int getNumCols()
getNumCols
in interface MatrixRow
getNumCols
in class BaseMatrixRow
public ByteBuffer getBuffer()
public ValueConf getValueConf()
protected int[] getColIds()
public float[] getValues()
Copyright © 2015. All rights reserved.