A toolkit for working with phylogenetic data.
v0.20.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Dataframe< T > Class Template Reference

#include <genesis/utils/containers/dataframe.hpp>

Detailed Description

template<typename T>
class genesis::utils::Dataframe< T >

Definition at line 57 of file dataframe.hpp.

Public Member Functions

 Dataframe ()=default
 
 Dataframe (Dataframe const &)=default
 
 Dataframe (Dataframe &&)=default
 
 ~Dataframe ()=default
 
self_typeadd_col ()
 
self_typeadd_col (std::string const &name)
 
self_typeadd_row ()
 
self_typeadd_row (std::string const &name)
 
reference at (size_type col_index)
 
const_reference at (size_type col_index) const
 
reference at (std::string const &col_name)
 
const_reference at (std::string const &col_name) const
 
iterator begin ()
 
const_iterator begin () const
 
const_iterator cbegin ()
 
const_iterator cend ()
 
self_typeclear ()
 
self_typeclear_cols ()
 
self_typeclear_rows ()
 
size_t col_index (std::string const &col_name) const
 
std::string const & col_name (size_type col_index) const
 
self_typecol_name (size_type col_index, std::string const &value)
 
std::vector< std::string > col_names () const
 
size_type cols () const
 
bool empty () const
 
iterator end ()
 
const_iterator end () const
 
Column::reference operator() (size_type row_index, size_type col_index)
 
Column::const_reference operator() (size_type row_index, size_type col_index) const
 
Column::reference operator() (std::string const &row_name, size_type col_index)
 
Column::const_reference operator() (std::string const &row_name, size_type col_index) const
 
Column::reference operator() (size_type row_index, std::string const &col_name)
 
Column::const_reference operator() (size_type row_index, std::string const &col_name) const
 
Column::reference operator() (std::string const &row_name, std::string const &col_name)
 
Column::const_reference operator() (std::string const &row_name, std::string const &col_name) const
 
Dataframeoperator= (Dataframe const &)=default
 
Dataframeoperator= (Dataframe &&)=default
 
reference operator[] (size_type col_index)
 
const_reference operator[] (size_type col_index) const
 
reference operator[] (std::string const &col_name)
 
const_reference operator[] (std::string const &col_name) const
 
self_typeremove_col (size_type col_index)
 
self_typeremove_col (std::string const &col_name)
 
self_typeremove_row (size_type row_index)
 
self_typeremove_row (std::string const &row_name)
 
size_t row_index (std::string const &row_name) const
 
std::string const & row_name (size_type row_index) const
 
self_typerow_name (size_type row_index, std::string const &value)
 
std::vector< std::string > const & row_names () const
 
size_type rows () const
 

Public Types

using const_iterator = typename std::vector< value_type >::const_iterator
 
using const_pointer = const value_type *
 
using const_reference = const value_type &
 
using iterator = typename std::vector< value_type >::iterator
 
using pointer = value_type *
 
using reference = value_type &
 
using self_type = Dataframe
 
using size_type = size_t
 
using value_type = Column
 

Classes

class  Column
 

Friends

class Column
 

Constructor & Destructor Documentation

Dataframe ( )
default
~Dataframe ( )
default
Dataframe ( Dataframe< T > const &  )
default
Dataframe ( Dataframe< T > &&  )
default

Member Function Documentation

self_type& add_col ( )
inline

Definition at line 515 of file dataframe.hpp.

self_type& add_col ( std::string const &  name)
inline

Definition at line 525 of file dataframe.hpp.

self_type& add_row ( )
inline

Definition at line 540 of file dataframe.hpp.

self_type& add_row ( std::string const &  name)
inline

Definition at line 551 of file dataframe.hpp.

reference at ( size_type  col_index)
inline

Definition at line 393 of file dataframe.hpp.

const_reference at ( size_type  col_index) const
inline

Definition at line 398 of file dataframe.hpp.

reference at ( std::string const &  col_name)
inline

Definition at line 403 of file dataframe.hpp.

const_reference at ( std::string const &  col_name) const
inline

Definition at line 408 of file dataframe.hpp.

iterator begin ( )
inline

Definition at line 320 of file dataframe.hpp.

const_iterator begin ( ) const
inline

Definition at line 325 of file dataframe.hpp.

const_iterator cbegin ( )
inline

Definition at line 340 of file dataframe.hpp.

const_iterator cend ( )
inline

Definition at line 345 of file dataframe.hpp.

self_type& clear ( )
inline

Definition at line 572 of file dataframe.hpp.

self_type& clear_cols ( )
inline

Definition at line 592 of file dataframe.hpp.

self_type& clear_rows ( )
inline

Definition at line 582 of file dataframe.hpp.

size_t col_index ( std::string const &  col_name) const
inline

Definition at line 486 of file dataframe.hpp.

std::string const& col_name ( size_type  col_index) const
inline

Definition at line 491 of file dataframe.hpp.

self_type& col_name ( size_type  col_index,
std::string const &  value 
)
inline

Definition at line 496 of file dataframe.hpp.

std::vector<std::string> col_names ( ) const
inline

Definition at line 506 of file dataframe.hpp.

size_type cols ( ) const
inline

Definition at line 359 of file dataframe.hpp.

bool empty ( ) const
inline

Definition at line 364 of file dataframe.hpp.

iterator end ( )
inline

Definition at line 330 of file dataframe.hpp.

const_iterator end ( ) const
inline

Definition at line 335 of file dataframe.hpp.

Column::reference operator() ( size_type  row_index,
size_type  col_index 
)
inline

Definition at line 417 of file dataframe.hpp.

Column::const_reference operator() ( size_type  row_index,
size_type  col_index 
) const
inline

Definition at line 422 of file dataframe.hpp.

Column::reference operator() ( std::string const &  row_name,
size_type  col_index 
)
inline

Definition at line 427 of file dataframe.hpp.

Column::const_reference operator() ( std::string const &  row_name,
size_type  col_index 
) const
inline

Definition at line 432 of file dataframe.hpp.

Column::reference operator() ( size_type  row_index,
std::string const &  col_name 
)
inline

Definition at line 437 of file dataframe.hpp.

Column::const_reference operator() ( size_type  row_index,
std::string const &  col_name 
) const
inline

Definition at line 442 of file dataframe.hpp.

Column::reference operator() ( std::string const &  row_name,
std::string const &  col_name 
)
inline

Definition at line 447 of file dataframe.hpp.

Column::const_reference operator() ( std::string const &  row_name,
std::string const &  col_name 
) const
inline

Definition at line 452 of file dataframe.hpp.

Dataframe& operator= ( Dataframe< T > const &  )
default
Dataframe& operator= ( Dataframe< T > &&  )
default
reference operator[] ( size_type  col_index)
inline

Definition at line 373 of file dataframe.hpp.

const_reference operator[] ( size_type  col_index) const
inline

Definition at line 378 of file dataframe.hpp.

reference operator[] ( std::string const &  col_name)
inline

Definition at line 383 of file dataframe.hpp.

const_reference operator[] ( std::string const &  col_name) const
inline

Definition at line 388 of file dataframe.hpp.

self_type& remove_col ( size_type  col_index)
inline

Definition at line 600 of file dataframe.hpp.

self_type& remove_col ( std::string const &  col_name)
inline

Definition at line 634 of file dataframe.hpp.

self_type& remove_row ( size_type  row_index)
inline

Definition at line 642 of file dataframe.hpp.

self_type& remove_row ( std::string const &  row_name)
inline

Definition at line 668 of file dataframe.hpp.

size_t row_index ( std::string const &  row_name) const
inline

Definition at line 461 of file dataframe.hpp.

std::string const& row_name ( size_type  row_index) const
inline

Definition at line 466 of file dataframe.hpp.

self_type& row_name ( size_type  row_index,
std::string const &  value 
)
inline

Definition at line 471 of file dataframe.hpp.

std::vector<std::string> const& row_names ( ) const
inline

Definition at line 481 of file dataframe.hpp.

size_type rows ( ) const
inline

Definition at line 354 of file dataframe.hpp.

Friends And Related Function Documentation

friend class Column
friend

Definition at line 305 of file dataframe.hpp.

Member Typedef Documentation

using const_iterator = typename std::vector< value_type >::const_iterator

Definition at line 297 of file dataframe.hpp.

using const_pointer = const value_type*

Definition at line 294 of file dataframe.hpp.

using const_reference = const value_type&

Definition at line 292 of file dataframe.hpp.

using iterator = typename std::vector< value_type >::iterator

Definition at line 296 of file dataframe.hpp.

using pointer = value_type*

Definition at line 293 of file dataframe.hpp.

Definition at line 291 of file dataframe.hpp.

Definition at line 288 of file dataframe.hpp.

using size_type = size_t

Definition at line 299 of file dataframe.hpp.

using value_type = Column

Definition at line 289 of file dataframe.hpp.


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