Class xlifepp::Tabular#

template<typename T>
class Tabular : public std::vector<T>#

Inheritence diagram for xlifepp::Tabular:

digraph { graph [bgcolor="#00000000"] node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2] edge [color="#1414CE"] "3" [label="xlifepp::Tabular< complex_t >" tooltip="xlifepp::Tabular< complex_t >"] "2" [label="std::vector< T >" tooltip="std::vector< T >"] "1" [label="xlifepp::Tabular< T >" tooltip="xlifepp::Tabular< T >" fillcolor="#BFBFBF"] "3" -> "1" [dir=forward tooltip="template-instance"] "1" -> "2" [dir=forward tooltip="public-inheritance"] }

Collaboration diagram for xlifepp::Tabular:

digraph { graph [bgcolor="#00000000"] node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2] edge [color="#1414CE"] "4" [label="std::vector< T >" tooltip="std::vector< T >"] "2" [label="std::vector< T >" tooltip="std::vector< T >"] "5" [label="std::vector< number_t >" tooltip="std::vector< number_t >"] "3" [label="std::vector< real_t >" tooltip="std::vector< real_t >"] "6" [label="std::vector< string_t >" tooltip="std::vector< string_t >"] "1" [label="xlifepp::Tabular< T >" tooltip="xlifepp::Tabular< T >" fillcolor="#BFBFBF"] "5" -> "4" [dir=forward tooltip="template-instance"] "3" -> "4" [dir=forward tooltip="template-instance"] "6" -> "4" [dir=forward tooltip="template-instance"] "1" -> "2" [dir=forward tooltip="public-inheritance"] "1" -> "3" [dir=forward tooltip="usage"] "1" -> "5" [dir=forward tooltip="usage"] "1" -> "6" [dir=forward tooltip="usage"] }

Public Functions

Tabular(real_t x0, real_t dx, number_t nx, const string_t &nax = "x1")#

construct a 1D grid

Tabular(real_t x0, real_t dx, number_t nx, funT1 f, const string_t &nax = "x1")#

construct a 1D table

Tabular(real_t x0, real_t dx, number_t nx, funTP1 f, Parameters &pars, const string_t &nax = "x1")#

construct a 1D table

Tabular(real_t x0, real_t dx, number_t nx, real_t y0, real_t dy, number_t ny, const string_t &nax = "x1", const string_t &nay = "x2")#

construct a 2D grid

Tabular(real_t x0, real_t dx, number_t nx, real_t y0, real_t dy, number_t ny, funT2 f, const string_t &nax = "x1", const string_t &nay = "x2")#

construct a 2D table

Tabular(real_t x0, real_t dx, number_t nx, real_t y0, real_t dy, number_t ny, funTP2 f, Parameters &pars, const string_t &nax = "x1", const string_t &nay = "x2")#

construct a 2D table

Tabular(real_t x0, real_t dx, number_t nx, real_t y0, real_t dy, number_t ny, real_t z0, real_t dz, number_t nz, const string_t &nax = "x1", const string_t &nay = "x2", const string_t &naz = "x3")#

construct a 3D grid

Tabular(real_t x0, real_t dx, number_t nx, real_t y0, real_t dy, number_t ny, real_t z0, real_t dz, number_t nz, funT3 f, const string_t &nax = "x1", const string_t &nay = "x2", const string_t &naz = "x3")#

construct a 3D grid

Tabular(real_t x0, real_t dx, number_t nx, real_t y0, real_t dy, number_t ny, real_t z0, real_t dz, number_t nz, funTP3 f, Parameters &pars, const string_t &nax = "x1", const string_t &nay = "x2", const string_t &naz = "x3")#

construct a 3D grid

void globalToIndex(number_t k, number_t d, std::vector<number_t>::iterator ijk) const#

gloal num to ijk… numbering

void loadFromFile(const string_t &filename)#

load table from file

inline void print(std::ostream &os) const#

write to a output stream

void saveToFile(const string_t &filename) const#

save table to file

save table to file with the following format dim valuetype valuedim comment name1 x1 dx1 nx1 name2 x2 dx2 nx2 named dxd nxd … x1_i1 x2_i2 … xd_id v_i1i2…id … the values v_i1i2…id are always a list of reals.

A complex if writen as 2 reals but valuedim is longer 1

inline T valrec(number_t d, number_t k, const std::vector<number_t> &is, const std::vector<real_t> &as) const#

recursive evaluation

Public Members

std::vector<number_t> bs#

block sizes (internal use)

number_t dim#

grid dimension

std::vector<string_t> name#

coordinate names

std::vector<number_t> nbstep#

coordinate steps

std::vector<real_t> start#

starting coordinates

std::vector<real_t> step#

coordinate steps