C++ API Reference for Intel® Data Analytics Acceleration Library 2020 Update 1

Static Public Member Functions | List of all members
CSRNumericTable Class Reference

Class that provides methods to access data stored in the CSR layout. More...

Static Public Member Functions

template<typename DataType >
static services::SharedPtr
< CSRNumericTable
create (DataType *const ptr, size_t *colIndices=0, size_t *rowOffsets=0, size_t nColumns=0, size_t nRows=0, CSRIndexing indexing=oneBased, services::Status *stat=NULL)
 
template<typename DataType >
static services::SharedPtr
< CSRNumericTable
create (const services::SharedPtr< DataType > &ptr, const services::SharedPtr< size_t > &colIndices, const services::SharedPtr< size_t > &rowOffsets, size_t nColumns, size_t nRows, CSRIndexing indexing=oneBased, services::Status *stat=NULL)
 

Additional Inherited Members

- Public Types inherited from NumericTableIface
enum  MemoryStatus { notAllocated, userAllocated, internallyAllocated }
 Enumeration to specify the status of memory related to the Numeric Table. More...
 
enum  AllocationFlag { doNotAllocate = 0, notAllocate = 0, doAllocate = 1 }
 Enumeration to specify whether the Numeric Table must allocate memory. More...
 
enum  BasicStatisticsId { minimum = 0, maximum = 1, sum = 2, sumSquares = 3 }
 Enumeration to specify estimates of basic statistics stored. More...
 
enum  FeatureBasicStatistics { counters }
 Enumeration to specify feature-specific estimates of basic statistics stored. More...
 
enum  NormalizationType { nonNormalized = 0, standardScoreNormalized = 1, minMaxNormalized = 2 }
 Enumeration to specify types of normalization. More...
 
enum  StorageLayout
 Storage layouts that may need to be supported. More...
 
- Public Types inherited from CSRNumericTableIface
enum  CSRIndexing { zeroBased = 0, oneBased = 1 }
 Enumeration to specify the indexing scheme for access to data in the CSR layout. More...
 

Class Declaration

Constructor & Destructor Documentation

CSRNumericTable ( )
inline

Constructor for an empty CSR Numeric Table

Deprecated:
This item will be removed in a future release. Use CSRNumericTable::create instead.
CSRNumericTable ( DataType *const  ptr,
size_t *  colIndices = 0,
size_t *  rowOffsets = 0,
size_t  nColumns = 0,
size_t  nRows = 0,
CSRIndexing  indexing = oneBased 
)
inline

Constructor for a Numeric Table with user-allocated memory

Template Parameters
DataTypeType of values in the Numeric Table
Parameters
[in]ptrArray of values in the CSR layout. Let ptr_size denote the size of an array ptr
[in]colIndicesArray of column indices in the CSR layout. Values of indices are determined by the index base
[in]rowOffsetsArray of row indices in the CSR layout. Size of the array is nrow+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
[in]nColumnsNumber of columns in the corresponding dense table
[in]nRowsNumber of rows in the corresponding dense table
[in]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
Deprecated:
This item will be removed in a future release. Use CSRNumericTable::create instead.
CSRNumericTable ( const services::SharedPtr< DataType > &  ptr,
const services::SharedPtr< size_t > &  colIndices,
const services::SharedPtr< size_t > &  rowOffsets,
size_t  nColumns,
size_t  nRows,
CSRIndexing  indexing = oneBased 
)
inline

Constructor for a Numeric Table with user-allocated memory

Template Parameters
DataTypeType of values in the Numeric Table
Parameters
[in]ptrArray of values in the CSR layout. Let ptr_size denote the size of an array ptr
[in]colIndicesArray of column indices in the CSR layout. Values of indices are determined by the index base
[in]rowOffsetsArray of row indices in the CSR layout. Size of the array is nrow+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
[in]nColumnsNumber of columns in the corresponding dense table
[in]nRowsNumber of rows in the corresponding dense table
[in]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
Deprecated:
This item will be removed in a future release. Use CSRNumericTable::create instead.

Member Function Documentation

services::Status allocateDataMemory ( size_t  dataSize,
daal::MemType  type = daal::dram 
)
inline

Allocates memory for a data set

Parameters
[in]dataSizeNumber of non-zero values
[in]typeMemory type
virtual services::Status check ( const char *  description,
bool  checkDataAllocation = true 
) const
inlinevirtual

Checks the correctness of this numeric table

Parameters
[in]descriptionAdditional information about error
[in]checkDataAllocationFlag that specifies whether to check the data allocation status
Returns
Check status: True if the table satisfies the requirements, false otherwise.

Reimplemented from NumericTable.

static services::SharedPtr<CSRNumericTable> create ( DataType *const  ptr,
size_t *  colIndices = 0,
size_t *  rowOffsets = 0,
size_t  nColumns = 0,
size_t  nRows = 0,
CSRIndexing  indexing = oneBased,
services::Status *  stat = NULL 
)
inlinestatic

Constructs CSR numeric table with user-allocated memory

Template Parameters
DataTypeType of values in the numeric table
Parameters
[in]ptrArray of values in the CSR layout. Let ptr_size denote the size of an array ptr
[in]colIndicesArray of column indices in the CSR layout. Values of indices are determined by the index base
[in]rowOffsetsArray of row indices in the CSR layout. Size of the array is nrow+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
[in]nColumnsNumber of columns in the corresponding dense table
[in]nRowsNumber of rows in the corresponding dense table
[in]indexingIndexing scheme used to access data in the CSR layout
[out]statStatus of the numeric table construction
Returns
CSR numeric table with user-allocated memory
Note
Present version of Intel(R) Data Analytics Acceleration Library supports 1-based indexing only
static services::SharedPtr<CSRNumericTable> create ( const services::SharedPtr< DataType > &  ptr,
const services::SharedPtr< size_t > &  colIndices,
const services::SharedPtr< size_t > &  rowOffsets,
size_t  nColumns,
size_t  nRows,
CSRIndexing  indexing = oneBased,
services::Status *  stat = NULL 
)
inlinestatic

Constructs CSR numeric table with user-allocated memory

Template Parameters
DataTypeType of values in the Numeric Table
Parameters
[in]ptrArray of values in the CSR layout. Let ptr_size denote the size of an array ptr
[in]colIndicesArray of column indices in the CSR layout. Values of indices are determined by the index base
[in]rowOffsetsArray of row indices in the CSR layout. Size of the array is nrow+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
[in]nColumnsNumber of columns in the corresponding dense table
[in]nRowsNumber of rows in the corresponding dense table
[in]indexingIndexing scheme used to access data in the CSR layout
[out]statStatus of the numeric table construction
Returns
CSR numeric table with user-allocated memory
Note
Present version of Intel(R) Data Analytics Acceleration Library supports 1-based indexing only
services::Status getArrays ( DataType **  ptr,
size_t **  colIndices,
size_t **  rowOffsets 
) const
inline

Returns pointers to a data set stored in the CSR layout

Parameters
[out]ptrArray of values in the CSR layout
[out]colIndicesArray of column indices in the CSR layout
[out]rowOffsetsArray of row indices in the CSR layout
services::Status getArrays ( services::SharedPtr< DataType > &  ptr,
services::SharedPtr< size_t > &  colIndices,
services::SharedPtr< size_t > &  rowOffsets 
) const
inline

Returns pointers to a data set stored in the CSR layout

Parameters
[out]ptrArray of values in the CSR layout
[out]colIndicesArray of column indices in the CSR layout
[out]rowOffsetsArray of row indices in the CSR layout
services::Status getBlockOfColumnValues ( size_t  feature_idx,
size_t  vector_idx,
size_t  value_num,
ReadWriteMode  rwflag,
BlockDescriptor< double > &  block 
)
inlinevirtual

Gets a block of values for a given feature.

Parameters
[in]feature_idxFeature index.
[in]vector_idxIndex of the first feature vector to include into the block.
[in]value_numNumber of feature values in the block.
[in]rwflagFlag specifying read/write access to the block of feature values.
[out]blockThe block of feature values.
Returns
Actual number of feature values returned by the method.

Implements DenseNumericTableIface.

services::Status getBlockOfColumnValues ( size_t  feature_idx,
size_t  vector_idx,
size_t  value_num,
ReadWriteMode  rwflag,
BlockDescriptor< float > &  block 
)
inlinevirtual

Gets a block of values for a given feature.

Parameters
[in]feature_idxFeature index.
[in]vector_idxIndex of the first feature vector to include into the block.
[in]value_numNumber of feature values in the block.
[in]rwflagFlag specifying read/write access to the block of feature values.
[out]blockThe block of feature values.
Returns
Actual number of feature values returned by the method.

Implements DenseNumericTableIface.

services::Status getBlockOfColumnValues ( size_t  feature_idx,
size_t  vector_idx,
size_t  value_num,
ReadWriteMode  rwflag,
BlockDescriptor< int > &  block 
)
inlinevirtual

Gets a block of values for a given feature.

Parameters
[in]feature_idxFeature index.
[in]vector_idxIndex of the first feature vector to include into the block.
[in]value_numNumber of feature values in the block.
[in]rwflagFlag specifying read/write access to the block of feature values.
[out]blockThe block of feature values.
Returns
Actual number of feature values returned by the method.

Implements DenseNumericTableIface.

services::Status getBlockOfRows ( size_t  vector_idx,
size_t  vector_num,
ReadWriteMode  rwflag,
BlockDescriptor< double > &  block 
)
inlinevirtual

Gets a block of rows from a table.

Parameters
[in]vector_idxIndex of the first row to include into the block.
[in]vector_numNumber of rows in the block.
[in]rwflagFlag specifying read/write access to the block of feature vectors.
[out]blockThe block of feature vectors.
Returns
Actual number of feature vectors returned by the method.

Implements DenseNumericTableIface.

services::Status getBlockOfRows ( size_t  vector_idx,
size_t  vector_num,
ReadWriteMode  rwflag,
BlockDescriptor< float > &  block 
)
inlinevirtual

Gets a block of rows from a table.

Parameters
[in]vector_idxIndex of the first row to include into the block.
[in]vector_numNumber of rows in the block.
[in]rwflagFlag specifying read/write access to the block of feature vectors.
[out]blockThe block of feature vectors.
Returns
Actual number of feature vectors returned by the method.

Implements DenseNumericTableIface.

services::Status getBlockOfRows ( size_t  vector_idx,
size_t  vector_num,
ReadWriteMode  rwflag,
BlockDescriptor< int > &  block 
)
inlinevirtual

Gets a block of rows from a table.

Parameters
[in]vector_idxIndex of the first row to include into the block.
[in]vector_numNumber of rows in the block.
[in]rwflagFlag specifying read/write access to the block of feature vectors.
[out]blockThe block of feature vectors.
Returns
Actual number of feature vectors returned by the method.

Implements DenseNumericTableIface.

CSRIndexing getCSRIndexing ( ) const
inline

Returns the indexing scheme for access to data in the CSR layout

Returns
CSR layout indexing
size_t getDataSize ( )
inlinevirtual

Returns number of elements in values array.

Returns
Number of elements in values array.

Implements CSRNumericTableIface.

services::Status getSparseBlock ( size_t  vector_idx,
size_t  vector_num,
ReadWriteMode  rwflag,
CSRBlockDescriptor< double > &  block 
)
inlinevirtual

Gets a block of feature vectors in the CSR layout.

Parameters
[in]vector_idxIndex of the first row to include into the block.
[in]vector_numNumber of rows in the block.
[in]rwflagFlag specifying read/write access to the block of feature vectors.
[out]blockThe block of feature values.
Returns
Actual number of feature vectors returned by the method.

Implements CSRNumericTableIface.

services::Status getSparseBlock ( size_t  vector_idx,
size_t  vector_num,
ReadWriteMode  rwflag,
CSRBlockDescriptor< float > &  block 
)
inlinevirtual

Gets a block of feature vectors in the CSR layout.

Parameters
[in]vector_idxIndex of the first row to include into the block.
[in]vector_numNumber of rows in the block.
[in]rwflagFlag specifying read/write access to the block of feature vectors.
[out]blockThe block of feature values.
Returns
Actual number of feature vectors returned by the method.

Implements CSRNumericTableIface.

services::Status getSparseBlock ( size_t  vector_idx,
size_t  vector_num,
ReadWriteMode  rwflag,
CSRBlockDescriptor< int > &  block 
)
inlinevirtual

Gets a block of feature vectors in the CSR layout.

Parameters
[in]vector_idxIndex of the first row to include into the block.
[in]vector_numNumber of rows in the block.
[in]rwflagFlag specifying read/write access to the block of feature vectors.
[out]blockThe block of feature values.
Returns
Actual number of feature vectors returned by the method.

Implements CSRNumericTableIface.

services::Status releaseBlockOfColumnValues ( BlockDescriptor< double > &  block)
inlinevirtual

Releases a block of values for a given feature.

Parameters
[in]blockThe block of feature values.

Implements DenseNumericTableIface.

services::Status releaseBlockOfColumnValues ( BlockDescriptor< float > &  block)
inlinevirtual

Releases a block of values for a given feature.

Parameters
[in]blockThe block of feature values.

Implements DenseNumericTableIface.

services::Status releaseBlockOfColumnValues ( BlockDescriptor< int > &  block)
inlinevirtual

Releases a block of values for a given feature.

Parameters
[in]blockThe block of feature values.

Implements DenseNumericTableIface.

services::Status releaseBlockOfRows ( BlockDescriptor< double > &  block)
inlinevirtual

Releases a block of rows.

Parameters
[in]blockThe block of rows.

Implements DenseNumericTableIface.

services::Status releaseBlockOfRows ( BlockDescriptor< float > &  block)
inlinevirtual

Releases a block of rows.

Parameters
[in]blockThe block of rows.

Implements DenseNumericTableIface.

services::Status releaseBlockOfRows ( BlockDescriptor< int > &  block)
inlinevirtual

Releases a block of rows.

Parameters
[in]blockThe block of rows.

Implements DenseNumericTableIface.

services::Status releaseSparseBlock ( CSRBlockDescriptor< double > &  block)
inlinevirtual

Releases a block of feature vectors in the CSR layout.

Parameters
[in]blockThe block of feature values.

Implements CSRNumericTableIface.

services::Status releaseSparseBlock ( CSRBlockDescriptor< float > &  block)
inlinevirtual

Releases a block of feature vectors in the CSR layout.

Parameters
[in]blockThe block of feature values.

Implements CSRNumericTableIface.

services::Status releaseSparseBlock ( CSRBlockDescriptor< int > &  block)
inlinevirtual

Releases a block of feature vectors in the CSR layout.

Parameters
[in]blockThe block of feature values.

Implements CSRNumericTableIface.

virtual services::Status resize ( size_t  nrows)
inlinevirtual

Sets the number of rows in the Numeric Table and allocates memory for a data set

Reimplemented from NumericTable.

services::Status setArrays ( DataType *const  ptr,
size_t *  colIndices,
size_t *  rowOffsets,
CSRIndexing  indexing = oneBased 
)
inline

Sets a pointer to a CSR data set

Parameters
[in]ptrArray of values in the CSR layout
[in]colIndicesArray of column indices in the CSR layout
[in]rowOffsetsArray of row indices in the CSR layout
[in]indexingThe indexing scheme for access to data in the CSR layout
services::Status setArrays ( const services::SharedPtr< DataType > &  ptr,
const services::SharedPtr< size_t > &  colIndices,
const services::SharedPtr< size_t > &  rowOffsets,
CSRIndexing  indexing = oneBased 
)
inline

Sets a pointer to a CSR data set

Parameters
[in]ptrArray of values in the CSR layout
[in]colIndicesArray of column indices in the CSR layout
[in]rowOffsetsArray of row indices in the CSR layout
[in]indexingThe indexing scheme for access to data in the CSR layout

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

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