Vita
Classes | Public Types | Public Member Functions | List of all members
vita::dataframe::columns_info Class Reference

Information about the collection of columns (type, name, output index). More...

#include <dataframe.h>

Classes

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

Public Types

using size_type = std::size_t
 

Public Member Functions

auto & back ()
 
const auto & back () const
 
auto begin ()
 
auto begin () const
 
void build (const record_t &, bool)
 Given an example compiles information about the columns of the dataframe. More...
 
 columns_info ()
 Constructs a new empty columns_info object. More...
 
bool empty () const
 
auto end ()
 
auto end () const
 
auto & front ()
 
const auto & front () const
 
bool is_valid () const
 
column_infooperator[] (size_type i)
 
const column_infooperator[] (size_type i) const
 
void pop_back ()
 
void push_back (const column_info &)
 Adds a new column at the end of the column list. More...
 
void push_front (const column_info &)
 Adds a new column at the front of the column list. More...
 
size_type size () const
 

Detailed Description

Information about the collection of columns (type, name, output index).

Definition at line 68 of file dataframe.h.

Member Typedef Documentation

◆ size_type

using vita::dataframe::columns_info::size_type = std::size_t

Definition at line 79 of file dataframe.h.

Constructor & Destructor Documentation

◆ columns_info()

vita::dataframe::columns_info::columns_info ( )

Constructs a new empty columns_info object.

Definition at line 80 of file dataframe.cc.

Member Function Documentation

◆ back() [1/2]

auto & vita::dataframe::columns_info::back ( )
inline

Definition at line 98 of file dataframe.h.

◆ back() [2/2]

const auto & vita::dataframe::columns_info::back ( ) const
inline

Definition at line 97 of file dataframe.h.

◆ begin() [1/2]

auto vita::dataframe::columns_info::begin ( )
inline

Definition at line 90 of file dataframe.h.

◆ begin() [2/2]

auto vita::dataframe::columns_info::begin ( ) const
inline

Definition at line 89 of file dataframe.h.

◆ build()

void vita::dataframe::columns_info::build ( const record_t r,
bool  header_first 
)

Given an example compiles information about the columns of the dataframe.

Parameters
[in]ra record containing an example
[in]header_firsttrue if the first example contains the header

The function can be called multiple times to incrementally collect information from different examples.

When header_first is true the first example is used to gather the names of the columns and successive example contribute to determine the domain of each column.

Remarks
The function assumes columns 0 as the output column.

Definition at line 119 of file dataframe.cc.

◆ empty()

bool vita::dataframe::columns_info::empty ( ) const
inline

Definition at line 87 of file dataframe.h.

◆ end() [1/2]

auto vita::dataframe::columns_info::end ( )
inline

Definition at line 92 of file dataframe.h.

◆ end() [2/2]

auto vita::dataframe::columns_info::end ( ) const
inline

Definition at line 91 of file dataframe.h.

◆ front() [1/2]

auto & vita::dataframe::columns_info::front ( )
inline

Definition at line 95 of file dataframe.h.

◆ front() [2/2]

const auto & vita::dataframe::columns_info::front ( ) const
inline

Definition at line 94 of file dataframe.h.

◆ is_valid()

bool vita::dataframe::columns_info::is_valid ( ) const
Returns
true if the object passes the internal consistency check

Definition at line 171 of file dataframe.cc.

◆ operator[]() [1/2]

column_info & vita::dataframe::columns_info::operator[] ( size_type  i)
inline

Definition at line 84 of file dataframe.h.

◆ operator[]() [2/2]

const column_info & vita::dataframe::columns_info::operator[] ( size_type  i) const
inline

Definition at line 83 of file dataframe.h.

◆ pop_back()

void vita::dataframe::columns_info::pop_back ( )
inline

Definition at line 100 of file dataframe.h.

◆ push_back()

void vita::dataframe::columns_info::push_back ( const column_info v)

Adds a new column at the end of the column list.

Parameters
[in]vinformation about the new column

Definition at line 89 of file dataframe.cc.

◆ push_front()

void vita::dataframe::columns_info::push_front ( const column_info v)

Adds a new column at the front of the column list.

Parameters
[in]vinformation about the new column

Definition at line 99 of file dataframe.cc.

◆ size()

size_type vita::dataframe::columns_info::size ( ) const
inline

Definition at line 86 of file dataframe.h.


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