Class that provides methods to access data stored in the CSR layout.
More...
|
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) |
|
|
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...
|
|
enum | CSRIndexing { zeroBased = 0,
oneBased = 1
} |
| Enumeration to specify the indexing scheme for access to data in the CSR layout. More...
|
|
Constructor for a Numeric Table with user-allocated memory
- Template Parameters
-
DataType | Type of values in the Numeric Table |
- Parameters
-
[in] | ptr | Array of values in the CSR layout. Let ptr_size denote the size of an array ptr |
[in] | colIndices | Array of column indices in the CSR layout. Values of indices are determined by the index base |
[in] | rowOffsets | Array 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] | nColumns | Number of columns in the corresponding dense table |
[in] | nRows | Number of rows in the corresponding dense table |
[in] | indexing | Indexing 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
-
DataType | Type of values in the Numeric Table |
- Parameters
-
[in] | ptr | Array of values in the CSR layout. Let ptr_size denote the size of an array ptr |
[in] | colIndices | Array of column indices in the CSR layout. Values of indices are determined by the index base |
[in] | rowOffsets | Array 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] | nColumns | Number of columns in the corresponding dense table |
[in] | nRows | Number of rows in the corresponding dense table |
[in] | indexing | Indexing 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.
Allocates memory for a data set
- Parameters
-
[in] | dataSize | Number of non-zero values |
[in] | type | Memory type |
virtual services::Status check |
( |
const char * |
description, |
|
|
bool |
checkDataAllocation = true |
|
) |
| const |
|
inlinevirtual |
Checks the correctness of this numeric table
- Parameters
-
[in] | description | Additional information about error |
[in] | checkDataAllocation | Flag 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
-
DataType | Type of values in the numeric table |
- Parameters
-
[in] | ptr | Array of values in the CSR layout. Let ptr_size denote the size of an array ptr |
[in] | colIndices | Array of column indices in the CSR layout. Values of indices are determined by the index base |
[in] | rowOffsets | Array 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] | nColumns | Number of columns in the corresponding dense table |
[in] | nRows | Number of rows in the corresponding dense table |
[in] | indexing | Indexing scheme used to access data in the CSR layout |
[out] | stat | Status 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
-
DataType | Type of values in the Numeric Table |
- Parameters
-
[in] | ptr | Array of values in the CSR layout. Let ptr_size denote the size of an array ptr |
[in] | colIndices | Array of column indices in the CSR layout. Values of indices are determined by the index base |
[in] | rowOffsets | Array 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] | nColumns | Number of columns in the corresponding dense table |
[in] | nRows | Number of rows in the corresponding dense table |
[in] | indexing | Indexing scheme used to access data in the CSR layout |
[out] | stat | Status 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] | ptr | Array of values in the CSR layout |
[out] | colIndices | Array of column indices in the CSR layout |
[out] | rowOffsets | Array 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] | ptr | Array of values in the CSR layout |
[out] | colIndices | Array of column indices in the CSR layout |
[out] | rowOffsets | Array 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_idx | Feature index. |
[in] | vector_idx | Index of the first feature vector to include into the block. |
[in] | value_num | Number of feature values in the block. |
[in] | rwflag | Flag specifying read/write access to the block of feature values. |
[out] | block | The 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_idx | Feature index. |
[in] | vector_idx | Index of the first feature vector to include into the block. |
[in] | value_num | Number of feature values in the block. |
[in] | rwflag | Flag specifying read/write access to the block of feature values. |
[out] | block | The 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_idx | Feature index. |
[in] | vector_idx | Index of the first feature vector to include into the block. |
[in] | value_num | Number of feature values in the block. |
[in] | rwflag | Flag specifying read/write access to the block of feature values. |
[out] | block | The 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_idx | Index of the first row to include into the block. |
[in] | vector_num | Number of rows in the block. |
[in] | rwflag | Flag specifying read/write access to the block of feature vectors. |
[out] | block | The 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_idx | Index of the first row to include into the block. |
[in] | vector_num | Number of rows in the block. |
[in] | rwflag | Flag specifying read/write access to the block of feature vectors. |
[out] | block | The 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_idx | Index of the first row to include into the block. |
[in] | vector_num | Number of rows in the block. |
[in] | rwflag | Flag specifying read/write access to the block of feature vectors. |
[out] | block | The block of feature vectors. |
- Returns
- Actual number of feature vectors returned by the method.
Implements DenseNumericTableIface.
Returns the indexing scheme for access to data in the CSR layout
- Returns
- CSR layout indexing
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_idx | Index of the first row to include into the block. |
[in] | vector_num | Number of rows in the block. |
[in] | rwflag | Flag specifying read/write access to the block of feature vectors. |
[out] | block | The 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_idx | Index of the first row to include into the block. |
[in] | vector_num | Number of rows in the block. |
[in] | rwflag | Flag specifying read/write access to the block of feature vectors. |
[out] | block | The 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_idx | Index of the first row to include into the block. |
[in] | vector_num | Number of rows in the block. |
[in] | rwflag | Flag specifying read/write access to the block of feature vectors. |
[out] | block | The 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] | block | The block of feature values. |
Implements DenseNumericTableIface.
services::Status releaseBlockOfColumnValues |
( |
BlockDescriptor< float > & |
block | ) |
|
|
inlinevirtual |
Releases a block of values for a given feature.
- Parameters
-
[in] | block | The block of feature values. |
Implements DenseNumericTableIface.
services::Status releaseBlockOfColumnValues |
( |
BlockDescriptor< int > & |
block | ) |
|
|
inlinevirtual |
Releases a block of values for a given feature.
- Parameters
-
[in] | block | The block of feature values. |
Implements DenseNumericTableIface.
Releases a block of feature vectors in the CSR layout.
- Parameters
-
[in] | block | The block of feature values. |
Implements CSRNumericTableIface.
Releases a block of feature vectors in the CSR layout.
- Parameters
-
[in] | block | The block of feature values. |
Implements CSRNumericTableIface.
Releases a block of feature vectors in the CSR layout.
- Parameters
-
[in] | block | The 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] | ptr | Array of values in the CSR layout |
[in] | colIndices | Array of column indices in the CSR layout |
[in] | rowOffsets | Array of row indices in the CSR layout |
[in] | indexing | The 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] | ptr | Array of values in the CSR layout |
[in] | colIndices | Array of column indices in the CSR layout |
[in] | rowOffsets | Array of row indices in the CSR layout |
[in] | indexing | The indexing scheme for access to data in the CSR layout |
The documentation for this class was generated from the following file: