Visible to Intel only — GUID: GUID-68366075-06A9-4E25-810A-07EDAD7DAA24
Visible to Intel only — GUID: GUID-68366075-06A9-4E25-810A-07EDAD7DAA24
Tables
Refer to Developer Guide: Tables.
Programming interface
All types and functions in this section are declared in the oneapi::dal namespace and be available via inclusion of the oneapi/dal/table/common.hpp header file.
Table
A base implementation of the table concept. The table type and all of its subtypes are reference-counted:
The instance stores a pointer to table implementation that holds all property values and data
The reference count indicating how many table objects refer to the same implementation.
The table increments the reference count for it to be equal to the number of table objects sharing the same implementation.
The table decrements the reference count when the table goes out of the scope. If the reference count is zero, the table frees its implementation.
classtable
Constructors
table()
An empty table constructor: creates the table instance with zero number of rows and columns.
table(consttable&)=default
Creates a new table instance that shares the implementation with another one.
table(table&&)
Creates a new table instance and moves implementation from another one into it.
Public Methods
table&operator=(consttable&)=default
Replaces the implementation by another one.
Swaps the implementation of this object and another one.
boolhas_data()constnoexcept
Indicates whether a table contains non-zero number of rows and columns.
std::int64_tget_column_count()const
The number of columns in the table.
std::int64_tget_row_count()const
The number of rows in the table.
consttable_metadata&get_metadata()const
The metadata object that holds additional information about the data within the table.
std::int64_tget_kind()const
The runtime id of the table type. Each table sub-type has its unique kind. An empty table has a unique kind value as well.
data_layoutget_data_layout()const
The layout of the data within the table.
Table metadata
An implementation of the table metadata concept. Holds additional information about data within the table. The objects of table_metadata are reference-counted.
classtable_metadata
Constructors
table_metadata()
Creates the metadata instance without information about the features. The feature_count should be set to zero. The data_type and feature_type properties should not be initialized.
table_metadata(constdal::array<data_type>&dtypes, constdal::array<feature_type>&ftypes)
Creates the metadata instance from external information about the data types and the feature types.
- Parameters
-
dtypes – The data types of the features. Assigned into the data_type property.
ftypes – The feature types. Assigned into the feature_type property.
Public Methods
std::int64_tget_feature_count()const
The number of features that metadata contains information about.
constfeature_type&get_feature_type(std::int64_tfeature_index)const
Feature types in the metadata object. Should be within the range [0, feature_count).
constdata_type&get_data_type(std::int64_tfeature_index)const
Data types of the features in the metadata object. Should be within the range [0, feature_count).
constdal::array<data_type>&get_data_types()const
Get data types of features in bulk.
constdal::array<feature_type>&get_feature_types()const
Get feature types in bulk.
Data layout
An implementation of the data layout concept.
enum class data_layout { unknown, row_major, column_major };
- data_layout::unknown
-
Represents the data layout that is undefined or unknown at this moment.
- data_layout::row_major
-
The data block elements are stored in raw-major layout.
- data_layout::column_major
-
The data block elements are stored in column_major layout.
Feature type
An implementation of the logical data types.
enum class feature_type { nominal, ordinal, interval, ratio };
- feature_type::nominal
-
Represents the type of Nominal feature.
- feature_type::ordinal
-
Represents the type of Ordinal feature.
- feature_type::interval
-
Represents the type of Interval feature.
- feature_type::ratio
-
Represents the type of Ratio feature.
Sparse Indexing
An implementation of the sparse indexing formats.
enum class sparse_indexing { zero_based, one_based };
- sparse_indexing::zero_based
-
The indices of the sparse table are stored in zero-based format.
- sparse_indexing::one_based
-
The indices of the sparse table are stored in one-based format.