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

#include <genesis/utils/containers/matrix/writer.hpp>

Detailed Description

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

Definition at line 53 of file utils/containers/matrix/writer.hpp.

Public Member Functions

 MatrixWriter ()=default
 
 MatrixWriter (MatrixWriter const &)=default
 
 MatrixWriter (MatrixWriter &&)=default
 
 ~MatrixWriter ()=default
 
Format format () const
 
MatrixWriterformat (Format value)
 
MatrixWriteroperator= (MatrixWriter const &)=default
 
MatrixWriteroperator= (MatrixWriter &&)=default
 
std::string const & separator_string () const
 
MatrixWriterseparator_string (std::string const &value)
 
void to_file (Matrix< T > const &mat, std::string const &fn, std::vector< std::string > const &row_names={}, std::vector< std::string > const &col_names={}, std::string const &corner="") const
 
void to_stream (Matrix< T > const &mat, std::ostream &os, std::vector< std::string > const &row_names={}, std::vector< std::string > const &col_names={}, std::string const &corner="") const
 
std::string to_string (Matrix< T > const &mat, std::vector< std::string > const &row_names={}, std::vector< std::string > const &col_names={}, std::string const &corner="") const
 
MatrixWriterwrite_value_functor (std::function< std::string(T const &)> functor)
 

Public Types

enum  Format { kMatrix, kList, kTriangular }
 

Constructor & Destructor Documentation

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

Member Function Documentation

Format format ( ) const
inline

Definition at line 133 of file utils/containers/matrix/writer.hpp.

MatrixWriter& format ( Format  value)
inline

Definition at line 138 of file utils/containers/matrix/writer.hpp.

MatrixWriter& operator= ( MatrixWriter< T > const &  )
default
MatrixWriter& operator= ( MatrixWriter< T > &&  )
default
std::string const& separator_string ( ) const
inline

Definition at line 122 of file utils/containers/matrix/writer.hpp.

MatrixWriter& separator_string ( std::string const &  value)
inline

Definition at line 127 of file utils/containers/matrix/writer.hpp.

void to_file ( Matrix< T > const &  mat,
std::string const &  fn,
std::vector< std::string > const &  row_names = {},
std::vector< std::string > const &  col_names = {},
std::string const &  corner = "" 
) const
inline

Definition at line 95 of file utils/containers/matrix/writer.hpp.

void to_stream ( Matrix< T > const &  mat,
std::ostream &  os,
std::vector< std::string > const &  row_names = {},
std::vector< std::string > const &  col_names = {},
std::string const &  corner = "" 
) const
inline

Definition at line 85 of file utils/containers/matrix/writer.hpp.

std::string to_string ( Matrix< T > const &  mat,
std::vector< std::string > const &  row_names = {},
std::vector< std::string > const &  col_names = {},
std::string const &  corner = "" 
) const
inline

Definition at line 107 of file utils/containers/matrix/writer.hpp.

MatrixWriter& write_value_functor ( std::function< std::string(T const &)>  functor)
inline

Definition at line 144 of file utils/containers/matrix/writer.hpp.

Member Enumeration Documentation

enum Format
strong
Enumerator
kMatrix 
kList 
kTriangular 

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


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