Java* API Reference for Intel® Data Analytics Acceleration Library 2019 Update 4

Classes | List of all members
CSRNumericTable Class Reference

Numeric table that provides methods to access data that is stored in the Compressed Sparse Row(CSR) data layout. More...

Class Constructor

CSRNumericTable ( DaalContext  context,
double[]  data,
long[]  colIndices,
long[]  rowOffsets,
long  nFeatures,
long  nVectors,
Indexing  indexing 
)

Constructs sparse CSR numeric table from the array of doubles

Parameters
contextContext to manage created CSR numeric table
dataArray of values in the CSR layout
colIndicesArray of column indices in the CSR layout. The values of indices are determined by the index base
rowOffsetsArray of row indices in the CSR layout. The size of the array is nVectors+1. The first element is 0/1 in zero-/one-based indexing. The last element is ptr_size+0/1 in zero-/one-based indexing
nFeaturesNumber of columns in the corresponding dense table
nVectorsNumber of rows in the corresponding dense table
indexingIndexing scheme used to access data in the CSR layout Note: Present version of Intel(R) Data Analytics Acceleration Library supports 1-based indexing only
CSRNumericTable ( DaalContext  context,
double[]  data,
long[]  colIndices,
long[]  rowOffsets,
long  nFeatures,
long  nVectors 
)

Constructs sparse CSR numeric table from the array of doubles with 1-based indexing

Parameters
contextContext to manage created CSR numeric table
dataArray of values in the CSR layout
colIndicesArray of column indices in the CSR layout. The values of indices are determined by the index base
rowOffsetsArray of row indices in the CSR layout. The size of the array is nVectors+1. The first element is 0/1 in zero-/one-based indexing. The last element is ptr_size+0/1 in zero-/one-based indexing
nFeaturesNumber of columns in the corresponding dense table
nVectorsNumber of rows in the corresponding dense table
CSRNumericTable ( DaalContext  context,
float[]  data,
long[]  colIndices,
long[]  rowOffsets,
long  nFeatures,
long  nVectors,
Indexing  indexing 
)

Constructs sparse CSR numeric table from array of floats

Parameters
contextContext to manage created CSR numeric table
dataArray of values in the CSR layout
colIndicesArray of column indices in the CSR layout. The values of indices are determined by the index base
rowOffsetsArray of row indices in the CSR layout. The size of the array is nVectors+1. The first element is 0/1 in zero-/one-based indexing. The last element is ptr_size+0/1 in zero-/one-based indexing
nFeaturesNumber of columns in the corresponding dense table
nVectorsNumber of rows in the corresponding dense table
indexingIndexing scheme used to access data in the CSR layout Note: Present version of Intel(R) Data Analytics Acceleration Library supports 1-based indexing only
CSRNumericTable ( DaalContext  context,
float[]  data,
long[]  colIndices,
long[]  rowOffsets,
long  nFeatures,
long  nVectors 
)

Constructs sparse CSR numeric table from the array of float with 1-based indexing

Parameters
contextContext to manage created CSR numeric table
dataArray of values in the CSR layout
colIndicesArray of column indices in the CSR layout. The values of indices are determined by the index base
rowOffsetsArray of row indices in the CSR layout. The size of the array is nVectors+1. The first element is 0/1 in zero-/one-based indexing. The last element is ptr_size+0/1 in zero-/one-based indexing
nFeaturesNumber of columns in the corresponding dense table
nVectorsNumber of rows in the corresponding dense table
CSRNumericTable ( DaalContext  context,
int[]  data,
long[]  colIndices,
long[]  rowOffsets,
long  nFeatures,
long  nVectors,
Indexing  indexing 
)

Constructs sparse CSR numeric table from the array of integers

Parameters
contextContext to manage created CSR numeric table
dataArray of values in the CSR layout
colIndicesArray of column indices in the CSR layout. The values of indices are determined by the index base
rowOffsetsArray of row indices in the CSR layout. The size of the array is nVectors+1. The first element is 0/1 in zero-/one-based indexing. The last element is ptr_size+0/1 in zero-/one-based indexing
nFeaturesNumber of columns in the corresponding dense table
nVectorsNumber of rows in the corresponding dense table
indexingIndexing scheme used to access data in the CSR layout Note: Present version of Intel(R) Data Analytics Acceleration Library supports 1-based indexing only
CSRNumericTable ( DaalContext  context,
int[]  data,
long[]  colIndices,
long[]  rowOffsets,
long  nFeatures,
long  nVectors 
)

Constructs sparse CSR numeric table from the array of integers with 1-based indexing

Parameters
contextContext to manage created CSR numeric table
dataArray of values in the CSR layout
colIndicesArray of column indices in the CSR layout. The values of indices are determined by the index base
rowOffsetsArray of row indices in the CSR layout. The size of the array is nVectors+1. The first element is 0/1 in zero-/one-based indexing. The last element is ptr_size+0/1 in zero-/one-based indexing
nFeaturesNumber of columns in the corresponding dense table
nVectorsNumber of rows in the corresponding dense table
CSRNumericTable ( DaalContext  context,
long[]  data,
long[]  colIndices,
long[]  rowOffsets,
long  nFeatures,
long  nVectors,
Indexing  indexing 
)

Constructs sparse CSR numeric table from the array of longs

Parameters
contextContext to manage created CSR numeric table
dataArray of values in the CSR layout
colIndicesArray of column indices in the CSR layout. The values of indices are determined by the index base
rowOffsetsArray of row indices in the CSR layout. The size of the array is nVectors+1. The first element is 0/1 in zero-/one-based indexing. The last element is ptr_size+0/1 in zero-/one-based indexing
nFeaturesNumber of columns in the corresponding dense table
nVectorsNumber of rows in the corresponding dense table
indexingIndexing scheme used to access data in the CSR layout Note: Present version of Intel(R) Data Analytics Acceleration Library supports 1-based indexing only
CSRNumericTable ( DaalContext  context,
long[]  data,
long[]  colIndices,
long[]  rowOffsets,
long  nFeatures,
long  nVectors 
)

Constructs sparse CSR numeric table from the array of longs with 1-based indexing

Parameters
contextContext to manage created CSR numeric table
dataArray of values in the CSR layout
colIndicesArray of column indices in the CSR layout. The values of indices are determined by the index base
rowOffsetsArray of row indices in the CSR layout. The size of the array is nVectors+1. The first element is 0/1 in zero-/one-based indexing. The last element is ptr_size+0/1 in zero-/one-based indexing
nFeaturesNumber of columns in the corresponding dense table
nVectorsNumber of rows in the corresponding dense table
CSRNumericTable ( DaalContext  context,
long  cTable 
)

Constructs homogeneous numeric table from C++ homogeneous numeric table

Parameters
contextContext to manage the ALS algorithm
cTablePointer to C++ numeric table

Detailed Description

Member Function Documentation

DoubleBuffer getBlockOfColumnValues ( long  featureIndex,
long  vectorIndex,
long  vectorNum,
DoubleBuffer  buf 
)

Gets block of values for a given feature and returns it to java.nio.DoubleBuffer. This function needs to be defined by user in the subclass of this class.

Parameters
featureIndexIndex of the feature
vectorIndexIndex of the first row to include into the block
vectorNumNumber of values in the block
bufBuffer to store results
Returns
Block of values of the feature packed into the DoubleBuffer
FloatBuffer getBlockOfColumnValues ( long  featureIndex,
long  vectorIndex,
long  vectorNum,
FloatBuffer  buf 
)

Gets block of values for a given feature and returns it to java.nio.FloatBuffer. This function needs to be defined by user in the subclass of this class.

Parameters
featureIndexIndex of the feature
vectorIndexIndex of the first row to include into the block
vectorNumNumber of values in the block
bufBuffer to store results
Returns
Block of values of the feature packed into the FloatBuffer
IntBuffer getBlockOfColumnValues ( long  featureIndex,
long  vectorIndex,
long  vectorNum,
IntBuffer  buf 
)

Gets block of values for a given feature and returns it to java.nio.IntBuffer. This function needs to be defined by user in the subclass of this class.

Parameters
featureIndexIndex of the feature
vectorIndexIndex of the first row to include into the block
vectorNumNumber of values in the block
bufBuffer to store results
Returns
Block of values of the feature packed into the IntBuffer
long [] getColIndicesArray ( )

Gets data as an array of longs

Returns
Table data as an array of longs
double [] getDoubleArray ( )

Gets data as an array of doubles

Returns
Table data as an array of double
float [] getFloatArray ( )

Gets data as an array of floats

Returns
Table data as an array of floats
long [] getLongArray ( )

Gets data as an array of longs

Returns
Table data as an array of longs
long [] getRowOffsetsArray ( )

Gets data as an array of longs

Returns
Table data as an array of longs
long getSparseBlock ( DataFeatureUtils.InternalNumType  numType,
long  vectorIndex,
long  vectorNum,
ByteBuffer  buf,
LongBuffer  colIndicesBuf,
LongBuffer  rowOffsetsBuf 
)
protected

Reads block of rows from the table and returns it to java.nio.DoubleBuffer

Parameters
numTypeType of data requested
vectorIndexIndex of the first row to include into the block
vectorNumNumber of rows in the block
bufBuffer to store non-zero values
colIndicesBufBuffer to store indices of the columns containing values from buf
rowOffsetsBufBuffer to store row offsets of the values from buf
Returns
Number of rows obtained from the table
void releaseBlockOfColumnValues ( long  featureIndex,
long  vectorIndex,
long  vectorNum,
DoubleBuffer  buf 
)

Transfers the values of a given feature from the input DoubleBuffer into a block of values of the feature in the table. This function needs to be defined by user in the subclass of this class.

Parameters
featureIndexIndex of the feature
vectorIndexIndex of the first row to include into the block
vectorNumNumber of values in the block
bufInput DoubleBuffer of size vectorNum
void releaseBlockOfColumnValues ( long  featureIndex,
long  vectorIndex,
long  vectorNum,
FloatBuffer  buf 
)

Transfers the values of a given feature from the input FloatBuffer into a block of values of the feature in the table. This function needs to be defined by user in the subclass of this class.

Parameters
featureIndexIndex of the feature
vectorIndexIndex of the first row to include into the block
vectorNumNumber of values in the block
bufInput FloatBuffer of size vectorNum
void releaseBlockOfColumnValues ( long  featureIndex,
long  vectorIndex,
long  vectorNum,
IntBuffer  buf 
)

Transfers the values of a given feature from the input IntBuffer into a block of values of the feature in the table. This function needs to be defined by user in the subclass of this class.

Parameters
featureIndexIndex of the feature
vectorIndexIndex of the first row to include into the block
vectorNumNumber of values in the block
bufInput IntBuffer of size vectorNum
void releaseBlockOfRows ( long  vectorIndex,
long  vectorNum,
DoubleBuffer  buf 
)

Transfers the data from the input DoubleBuffer into a block of table rows. This function needs to be defined by user in the subclass of this class.

Parameters
vectorIndexIndex of the first row to include into the block
vectorNumNumber of rows in the block
bufInput DoubleBuffer with the capacity vectorNum * nColumns, where nColumns is the number of columns in the table
void releaseBlockOfRows ( long  vectorIndex,
long  vectorNum,
FloatBuffer  buf 
)

Transfers the data from the input FloatBuffer into a block of table rows. This function needs to be defined by user in the subclass of this class.

Parameters
vectorIndexIndex of the first row to include into the block
vectorNumNumber of rows in the block
bufInput FloatBuffer with the capacity vectorNum * nColumns, where nColumns is the number of columns in the table
void releaseBlockOfRows ( long  vectorIndex,
long  vectorNum,
IntBuffer  buf 
)

Transfers the data from the input IntBuffer into a block of table rows. This function needs to be defined by user in the subclass of this class.

Parameters
vectorIndexIndex of the first row to include into the block
vectorNumNumber of rows in the block
bufInput IntBuffer with the capacity vectorNum * nColumns, where nColumns is the number of columns in the table

Classes

class  Indexing
 Indexing scheme used for accessing the data in CSR layout More...
 

The documentation for this class was generated from the following file:

For more complete information about compiler optimizations, see our Optimization Notice.