A toolkit for working with phylogenetic data.
v0.18.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)
 
const T at (const size_t row, const size_t col) const
 
iterator begin ()
 
const_iterator begin () const
 
const_iterator cbegin () const
 
const_iterator cend () const
 
std::vector< T > col (size_t index) const
 
size_t cols () const
 
std::vector< T > const & data () const
 
iterator end ()
 
const_iterator end () const
 
bool operator!= (const Matrix< T > &rhs) const
 
T & operator() (const size_t row, const size_t col)
 
const T operator() (const size_t row, const size_t col) const
 
Matrixoperator= (Matrix const &)=default
 
Matrixoperator= (Matrix &&)=default
 
bool operator== (const Matrix< T > &rhs) const
 
std::vector< T > row (size_t index) const
 
size_t rows () const
 
size_t size () const
 
void swap (Matrix &other)
 

Public Types

typedef std::vector< T >
::const_iterator 
const_iterator
 
typedef std::vector< T >::iterator iterator
 
typedef T value_type
 

Constructor & Destructor Documentation

Matrix ( )
inline

Definition at line 62 of file matrix.hpp.

Matrix ( size_t  rows,
size_t  cols 
)
inline

Definition at line 68 of file matrix.hpp.

Matrix ( size_t  rows,
size_t  cols,
init 
)
inline

Definition at line 74 of file matrix.hpp.

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

Definition at line 80 of file matrix.hpp.

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

Definition at line 95 of file matrix.hpp.

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

Definition at line 110 of file 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 175 of file matrix.hpp.

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

Definition at line 183 of file matrix.hpp.

iterator begin ( )
inline

Definition at line 235 of file matrix.hpp.

const_iterator begin ( ) const
inline

Definition at line 245 of file matrix.hpp.

const_iterator cbegin ( ) const
inline

Definition at line 255 of file matrix.hpp.

const_iterator cend ( ) const
inline

Definition at line 260 of file matrix.hpp.

std::vector<T> col ( size_t  index) const
inline

Definition at line 218 of file matrix.hpp.

size_t cols ( ) const
inline

Definition at line 156 of file matrix.hpp.

std::vector<T> const& data ( ) const
inline

Definition at line 166 of file matrix.hpp.

iterator end ( )
inline

Definition at line 240 of file matrix.hpp.

const_iterator end ( ) const
inline

Definition at line 250 of file matrix.hpp.

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

Definition at line 276 of file matrix.hpp.

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

Definition at line 191 of file matrix.hpp.

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

Definition at line 196 of file matrix.hpp.

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

Definition at line 269 of file matrix.hpp.

std::vector<T> row ( size_t  index) const
inline

Definition at line 205 of file matrix.hpp.

size_t rows ( ) const
inline

Definition at line 151 of file matrix.hpp.

size_t size ( ) const
inline

Definition at line 161 of file matrix.hpp.

void swap ( Matrix< T > &  other)
inline

Definition at line 139 of file matrix.hpp.

Member Typedef Documentation

typedef std::vector<T>::const_iterator const_iterator

Definition at line 56 of file matrix.hpp.

typedef std::vector<T>::iterator iterator

Definition at line 55 of file matrix.hpp.

typedef T value_type

Definition at line 54 of file matrix.hpp.


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