Ultra 0.9.4
Loading...
Searching...
No Matches
ultra::src::columns_info::column_info Class Reference

Information about a single column of the dataset. More...

#include <columns_info.h>

Public Member Functions

 column_info (const columns_info &, std::string_view="", domain_t=d_void, const std::set< value_t > &={})
const std::string & name () const noexcept
void name (const std::string &)
domain_t domain () const noexcept
void domain (domain_t)
const std::set< value_t > & states () const noexcept
void add_state (value_t)
symbol::category_t category () const

Detailed Description

Information about a single column of the dataset.

Constructor & Destructor Documentation

◆ column_info()

ultra::src::columns_info::column_info::column_info ( const columns_info & csi,
std::string_view name = "",
domain_t domain = d_void,
const std::set< value_t > & states = {} )
explicit
Parameters
[in]csiowner columns_info object
[in]namename of the column
[in]domaindomain of the column (must be a basic data type)
[in]statespossible restriction to a set of values

Member Function Documentation

◆ add_state()

void ultra::src::columns_info::column_info::add_state ( value_t s)

Register a new observed state for the column.

Parameters
[in]svalue to add to the set of states

◆ category()

symbol::category_t ultra::src::columns_info::column_info::category ( ) const
nodiscard

Computes and returns the category assigned to this column.

Note
This is a computed property: if the value needs to be used multiple times, consider storing it in a local variable.

◆ domain() [1/2]

domain_t ultra::src::columns_info::column_info::domain ( ) const
nodiscardnoexcept

Return the domain of the column.

Returns
domain describing the column values

◆ domain() [2/2]

void ultra::src::columns_info::column_info::domain ( domain_t d)

Set the domain of the column.

Parameters
[in]dnew domain

◆ name() [1/2]

const std::string & ultra::src::columns_info::column_info::name ( ) const
nodiscardnoexcept

Return the column name.

Returns
name associated with the column

◆ name() [2/2]

void ultra::src::columns_info::column_info::name ( const std::string & n)

Set the column name.

Parameters
[in]nnew name for the column

◆ states()

const std::set< value_t > & ultra::src::columns_info::column_info::states ( ) const
nodiscardnoexcept

Return the set of observed states.

Returns
set of distinct values observed for the column

This is typically used for categorical domains.


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