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

#include <genesis/placement/function/emd.hpp>

Detailed Description

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

Definition at line 53 of file placement/function/emd.hpp.

Public Member Functions

 Matrix ()
 
 Matrix (size_t rows, size_t cols)
 
 Matrix (size_t rows, size_t cols, T init)
 
 Matrix (size_t rows, size_t cols, std::vector< T > const &data)
 
 Matrix (size_t rows, size_t cols, std::vector< T > &&data)
 
 Matrix (size_t rows, size_t cols, std::initializer_list< T > const &init_list)
 
 Matrix (Matrix const &)=default
 
 Matrix (Matrix &&)=default
 
 ~Matrix ()=default
 
T & at (const size_t row, const size_t col)
 
T const & at (const size_t row, const size_t col) const
 
iterator begin ()
 
const_iterator begin () const
 
const_iterator cbegin () const
 
const_iterator cend () const
 
MatrixCol< self_type, value_typecol (size_t col)
 
MatrixCol< const self_type,
const value_type
col (size_t col) const
 
size_t cols () const
 
container_type const & data () const
 
bool empty () const
 
iterator end ()
 
const_iterator end () const
 
bool operator!= (Matrix< T > const &other) const
 
T & operator() (const size_t row, const size_t col)
 
T const & operator() (const size_t row, const size_t col) const
 
Matrixoperator= (Matrix const &)=default
 
Matrixoperator= (Matrix &&)=default
 
bool operator== (Matrix< T > const &other) const
 
MatrixRow< self_type, value_typerow (size_t row)
 
MatrixRow< const self_type,
const value_type
row (size_t row) const
 
size_t rows () const
 
size_t size () const
 
void swap (Matrix &other)
 

Public Types

using const_iterator = typename container_type::const_iterator
 
using container_type = std::vector< T >
 
using iterator = typename container_type::iterator
 
using self_type = Matrix< T >
 
using value_type = T
 

Friends

void swap (Matrix &lhs, Matrix &rhs)
 

Constructor & Destructor Documentation

Matrix ( )
inline

Definition at line 68 of file containers/matrix.hpp.

Matrix ( size_t  rows,
size_t  cols 
)
inline

Definition at line 74 of file containers/matrix.hpp.

Matrix ( size_t  rows,
size_t  cols,
init 
)
inline

Definition at line 80 of file containers/matrix.hpp.

Matrix ( size_t  rows,
size_t  cols,
std::vector< T > const &  data 
)
inline

Definition at line 86 of file containers/matrix.hpp.

Matrix ( size_t  rows,
size_t  cols,
std::vector< T > &&  data 
)
inline

Definition at line 101 of file containers/matrix.hpp.

Matrix ( size_t  rows,
size_t  cols,
std::initializer_list< T > const &  init_list 
)
inline

Definition at line 116 of file containers/matrix.hpp.

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

Member Function Documentation

T& at ( const size_t  row,
const size_t  col 
)
inline

Definition at line 191 of file containers/matrix.hpp.

T const& at ( const size_t  row,
const size_t  col 
) const
inline

Definition at line 199 of file containers/matrix.hpp.

iterator begin ( )
inline

Definition at line 261 of file containers/matrix.hpp.

const_iterator begin ( ) const
inline

Definition at line 271 of file containers/matrix.hpp.

const_iterator cbegin ( ) const
inline

Definition at line 281 of file containers/matrix.hpp.

const_iterator cend ( ) const
inline

Definition at line 286 of file containers/matrix.hpp.

MatrixCol<self_type, value_type> col ( size_t  col)
inline

Definition at line 239 of file containers/matrix.hpp.

MatrixCol<const self_type, const value_type> col ( size_t  col) const
inline

Definition at line 248 of file containers/matrix.hpp.

size_t cols ( ) const
inline

Definition at line 167 of file containers/matrix.hpp.

container_type const& data ( ) const
inline

Definition at line 182 of file containers/matrix.hpp.

bool empty ( ) const
inline

Definition at line 177 of file containers/matrix.hpp.

iterator end ( )
inline

Definition at line 266 of file containers/matrix.hpp.

const_iterator end ( ) const
inline

Definition at line 276 of file containers/matrix.hpp.

bool operator!= ( Matrix< T > const &  other) const
inline

Definition at line 302 of file containers/matrix.hpp.

T& operator() ( const size_t  row,
const size_t  col 
)
inline

Definition at line 207 of file containers/matrix.hpp.

T const& operator() ( const size_t  row,
const size_t  col 
) const
inline

Definition at line 212 of file containers/matrix.hpp.

Matrix& operator= ( Matrix< T > const &  )
default
Matrix& operator= ( Matrix< T > &&  )
default
bool operator== ( Matrix< T > const &  other) const
inline

Definition at line 295 of file containers/matrix.hpp.

MatrixRow<self_type, value_type> row ( size_t  row)
inline

Definition at line 221 of file containers/matrix.hpp.

MatrixRow<const self_type, const value_type> row ( size_t  row) const
inline

Definition at line 230 of file containers/matrix.hpp.

size_t rows ( ) const
inline

Definition at line 162 of file containers/matrix.hpp.

size_t size ( ) const
inline

Definition at line 172 of file containers/matrix.hpp.

void swap ( Matrix< T > &  other)
inline

Definition at line 145 of file containers/matrix.hpp.

Friends And Related Function Documentation

void swap ( Matrix< T > &  lhs,
Matrix< T > &  rhs 
)
friend

Definition at line 153 of file containers/matrix.hpp.

Member Typedef Documentation

using const_iterator = typename container_type::const_iterator

Definition at line 62 of file containers/matrix.hpp.

using container_type = std::vector<T>

Definition at line 60 of file containers/matrix.hpp.

using iterator = typename container_type::iterator

Definition at line 61 of file containers/matrix.hpp.

using self_type = Matrix<T>

Definition at line 57 of file containers/matrix.hpp.

using value_type = T

Definition at line 58 of file containers/matrix.hpp.


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