O2scl : Function List

Functions vector_spec

template<class vec_t>
int o2scl_hdf::vector_spec(std::string spec, vec_t &v, int verbose = 0, bool err_on_fail = true)

A vector specified by a string.

Formats:

  • single value: val:<value>

  • list of values: list:<entry 0>,<entry 1>, …,<entry n-1>

  • function: func:<N>:<function of i>

  • grid: grid:<begin>:<end>:<width>:[“log”]

  • column in text file: text:<filename>:<column index>

  • HDF5 object in file: hdf5:<file name>:<object name>:[additional specification]

Filenames are expanded using wordexp() and HDF5 object names are expanded using regex.

Additional specifications

  • table: <column>

  • table-row: table-row:<row>:<column pattern>

Note

Any data in the vector before the function is called will be lost.

Warning

Experimental.

std::vector<double> o2scl_hdf::vector_spec(std::string spec)

Convert a vector specification to a std::vector.