xerus
a general purpose tensor library
|
Collection of classes and functions that provide elementary functionality that is not special to xerus as a tensor library. More...
Namespaces | |
internal | |
Namespace for function and classes designated only for internal use. | |
performanceAnalysis | |
This namespace contains all functions only used for the performance analysis, as well as the respective global variables. | |
Classes | |
class | generic_error |
The xerus exception class. More... | |
class | LimitExtractor |
Classes that can extract an estimate of the limit of a sequence. More... | |
class | LogHistogram |
A logarithmic histogram, i.e. the size of all buckets is given by a constant factor [x - x*base) More... | |
class | RichardsonExtrapolation |
Limit extraction using the richardson extrapolation. More... | |
class | ShanksTransformation |
Limit extraction using the shanks transformation aka Aitken process. More... | |
Enumerations | |
enum | FileFormat { FileFormat::BINARY, FileFormat::TSV } |
possible file formats for tensor storage More... | |
Functions | |
template<class T > | |
__attribute__ ((const)) T difference(T _a | |
template<typename T > | |
void | add (T *const __restrict _x, const T *const __restrict _y, const size_t _n) noexcept |
Adds _n entries of _y to the ones of _x. I.e. x += y. More... | |
template<typename T > | |
void | add_scaled (T *const __restrict _x, const T _alpha, const T *const __restrict _y, const size_t _n) noexcept |
Adds _n entries of _y, scaled by _alpha to the ones of _x. I.e. x += alpha*y. More... | |
template<class T > | |
void | apply_permutation (std::vector< T > &_vec, const std::vector< size_t > &_permutation) |
template<class T , typename std::enable_if< std::is_floating_point< T >::value, bool >::type = true> | |
bool | approx_equal (T _a, T _b, T _eps=4 *std::numeric_limits< T >::epsilon()) noexcept |
: Checks whether the relative difference between _a and _b (i.e. |a-b|/(|a|/2+|b|/2)) is smaller than _eps. More... | |
template<class T , typename std::enable_if<!std::is_floating_point< T >::value, bool >::type = true> | |
bool | approx_equal (T _a, T _b) |
: Checks whether _a and _b are equal (for non floating point types). More... | |
template<typename T , typename std::enable_if< std::is_trivial< T >::value, int >::type = 0> | |
void | copy (T *const __restrict _dest, const T *const __restrict _src, const size_t _n) noexcept |
Copys _n entries from _y to _x, where _y and _x must be disjunkt memory regions. More... | |
template<typename T , typename std::enable_if< std::is_trivial< T >::value, int >::type = 0> | |
void | copy_inplace (T *const _x, const T *const _y, const size_t _n) noexcept |
Copys _n entries from _y to _x, allowing the accessed memry regions of _y and _x to overlap. More... | |
template<typename T > | |
void | copy_scaled (T *const __restrict _x, const T _alpha, const T *const _y, const size_t _n) noexcept |
Copys _n entries from _y to _x, simulationously scaling each entry by the factor _alpha. I.e x = alpha*y. More... | |
template<class T , class Comparator > | |
std::vector< size_t > | create_sort_permutation (const std::vector< T > &_vec, Comparator _comp) |
std::string XERUS_warn_unused | demangle_cxa (const std::string &_cxa) |
Demangles the function and class names created by gcc into a more readable format. More... | |
std::string | exec (const std::string &_cmd) |
Execute a given command. More... | |
void | exec (const std::string &_cmd, const std::string &_stdin) |
Execute a given command and pipe _stdin to its std input,. More... | |
std::vector< std::string > | explode (const std::string &_string, const char _delim) |
: Explodes a string at positions indicated by _delim. More... | |
double | find_root_bisection (const std::function< double(double)> &_f, double _min, double _max, double _epsilon=1e-14) |
template<typename T > | |
T | from_string (const std::string &_s) |
: Creates an arbitary Object from string More... | |
template<> | |
XERUS_force_inline double | from_string< double > (const std::string &_str) |
template<> | |
XERUS_force_inline float | from_string< float > (const std::string &_str) |
template<> | |
XERUS_force_inline int | from_string< int > (const std::string &_str) |
template<> | |
XERUS_force_inline long | from_string< long > (const std::string &_str) |
template<> | |
XERUS_force_inline long double | from_string< long double > (const std::string &_str) |
template<> | |
XERUS_force_inline long long | from_string< long long > (const std::string &_str) |
template<> | |
XERUS_force_inline unsigned long | from_string< unsigned long > (const std::string &_str) |
template<> | |
XERUS_force_inline unsigned long long | from_string< unsigned long long > (const std::string &_str) |
std::string | get_call_stack () |
Returns a string representation of the current call-stack (excluding the function itself). More... | |
std::pair< uintptr_t, uintptr_t > | get_range_of_section (void *_addr, std::string _name) |
Returns the address range of the elf-section names _name as part of the executable / so file that contained _addr. More... | |
template<class T > | |
constexpr bool | hard_equal (const T _a, const T _b) noexcept |
: Checks for hard equality ( == operator) without compiler warnings. More... | |
template<class T > | |
constexpr bool | hard_not_equal (const T _a, const T _b) noexcept |
: Checks for hard inequality ( != operator) without compiler warnings. More... | |
double | integrate (const std::function< double(double)> &_f, double _a, double _b, double _eps=std::numeric_limits< double >::epsilon(), uint _minIter=4, uint _maxIter=6, uint _branchFactor=7, uint _maxRecursion=10, bool _relativeError=true) |
Performs a Romberg Integration (richardson extrapolation of regular riemannian sum) + adaptive refinement. More... | |
double | integrate_segmented (const std::function< double(double)> &_f, double _a, double _b, double _segmentation, double _eps=1e-8, uint _minIter=4, uint _maxIter=6, uint _branchFactor=8, uint _maxRecursion=10) |
template<class T > | |
void | load_from_file (T &_obj, const std::string &_filename) |
template<class T > | |
T | load_from_file (const std::string &_filename) |
template<class T > | |
std::unique_ptr< T[]> | make_unique_array (T *_ptr) |
size_t | mTime () |
: Returns the time since epoche in milliseconds. More... | |
std::string XERUS_warn_unused | normalize_pathname (const std::string &_name) |
Resolves 'folder/..' occurences in pathnames. More... | |
template<class... Tp> | |
std::ostream & | operator<< (std::ostream &_out, const std::tuple< Tp... > &_tuple) |
Allow to pipe tuples to ostreams. More... | |
template<typename error_t , class T > | |
std::enable_if< std::is_base_of< generic_error, error_t >::value, error_t & >::type | operator<< (error_t &o, const T &_info) noexcept |
The pipe operator allows to add everything that can be converted to string to the error_info and derived exceptions. More... | |
template<class first_t , class second_t > | |
std::ostream & | operator<< (std::ostream &_out, const std::pair< first_t, second_t > &_pair) |
Allow to pipe std::pairs to ostreams. More... | |
template<typename error_t , class T > | |
std::enable_if< std::is_base_of< generic_error, error_t >::value, error_t & >::type | operator<< (error_t &&o, const T &_info) noexcept |
The pipe operator allows to add everything that can be converted to string to the error_info and derived exceptions. More... | |
template<class item_t , class... rest_t> | |
std::ostream & | operator<< (std::ostream &_out, const std::vector< item_t, rest_t... > &_container) |
Allow to pipe normal containers to ostreams. More... | |
template<class item_t , class... rest_t> | |
std::ostream & | operator<< (std::ostream &_out, const std::set< item_t, rest_t... > &_container) |
Allow to pipe std::sets to ostreams. More... | |
template<class T , class U > | |
std::ostream & | operator<< (std::ostream &_out, const std::map< T, U > &_set) |
Allow to pipe std::maps to ostreams. More... | |
template<class T > | |
constexpr T | pow (const T &_base, const uint32 _exp) noexcept |
: Calculates _base^_exp by binary exponentiation More... | |
template<class T > | |
constexpr T | pow (const T &_base, const uint64 _exp) noexcept |
: Calculates _base^_exp by binary exponentiation More... | |
template<class T > | |
constexpr T | pow (const T &_base, const int64 _exp) noexcept |
: Calculates _base^_exp by binary exponentiation More... | |
template<class T > | |
constexpr T | pow (const T &_base, const int32 _exp) noexcept |
: Calculates _base^_exp by binary exponentiation More... | |
thread_local std::mt19937_64 | randomEngine (std::random_device{}()) |
template<class T > | |
XERUS_force_inline void | read_from_stream (std::istream &_stream, T &_obj, const FileFormat _format) |
template<class T > | |
XERUS_force_inline T | read_from_stream (std::istream &_stream, const FileFormat _format) |
std::string XERUS_warn_unused | reduce (const std::string &_string, const std::string &whitespace=" \\", const std::string &fill=" ") |
: Removes all leading and trailing whitespaces from _string, and reduces all double whitespaces to one. More... | |
void | replace (std::string &_string, const std::string &_search, const std::string &_replace) |
: Replaces all occurences of _search in _string by _replace. More... | |
template<class T > | |
void | save_to_file (const T &_obj, const std::string &_filename, const FileFormat _format=FileFormat::BINARY) |
template<typename T > | |
void | scale (T *const __restrict _x, const T _alpha, const size_t _n) noexcept |
Scales _n entries of _x by the factor _alpha. I.e. x = alpha*x. More... | |
template<typename T , typename std::enable_if< std::is_trivial< T >::value, int >::type = 0> | |
void | set_zero (T *const __restrict _x, const size_t _n) noexcept |
Sets all entries equal to zero. More... | |
template<class T > | |
constexpr int | sgn (const T _value) noexcept |
: Calculates the signum (-1, 0, 1) of a given value. More... | |
template<class KeyType , class DataType , class Comparator > | |
void | simultaneous_sort (std::vector< KeyType > &_keyVector, std::vector< DataType > &_dataVector, Comparator _comp) |
template<class T > | |
constexpr T | sqr (const T &_a) noexcept |
: Calculates _a*_a. More... | |
template<class T , typename std::enable_if< std::is_arithmetic< T >::value, bool >::type = true> | |
void | stream_reader (std::istream &_stream, T &_obj, const FileFormat _format) |
template<class T > | |
void | stream_reader (std::istream &_stream, std::vector< T > &_obj, const FileFormat _format) |
void | stream_reader (std::istream &_stream, TensorNetwork &_obj, const FileFormat _format) |
Restores the TensorNetwork from a stream of data. More... | |
template<bool isOperator> | |
void | stream_reader (std::istream &_stream, TTNetwork< isOperator > &_obj, const misc::FileFormat _format) |
Restores the TTNetwork from a stream of data. More... | |
void | stream_reader (std::istream &_stream, Tensor &_obj, const FileFormat _format) |
tries to restore the tensor from a stream of data. More... | |
template void | stream_reader (std::istream &_stream, TTNetwork< true > &_obj, const misc::FileFormat _format) |
template void | stream_reader (std::istream &_stream, TTNetwork< false > &_obj, const misc::FileFormat _format) |
template<class T , typename std::enable_if< std::is_arithmetic< T >::value, bool >::type = true> | |
void | stream_writer (std::ostream &_stream, const T &_value, FileFormat _format) |
template<class T > | |
void | stream_writer (std::ostream &_stream, const std::vector< T > &_value, FileFormat _format) |
void | stream_writer (std::ostream &_stream, const TensorNetwork &_obj, const FileFormat _format) |
Pipes all information necessary to restore the current TensorNetwork into _stream. More... | |
template<bool isOperator> | |
void | stream_writer (std::ostream &_stream, const TTNetwork< isOperator > &_obj, misc::FileFormat _format) |
Pipes all information necessary to restore the current TensorNetwork into _stream. More... | |
void | stream_writer (std::ostream &_stream, const Tensor &_obj, const FileFormat _format) |
pipes all information necessary to restore the current tensor into _stream. More... | |
template void | stream_writer (std::ostream &_stream, const TTNetwork< true > &_obj, misc::FileFormat _format) |
template void | stream_writer (std::ostream &_stream, const TTNetwork< false > &_obj, misc::FileFormat _format) |
static XERUS_force_inline std::string | to_string (const bool obj) |
static XERUS_force_inline std::string | to_string (const std::string &obj) |
static XERUS_force_inline std::string | to_string (const char *const obj) |
template<typename T > | |
std::string | to_string (const T &obj) |
: Converts any object (which has no specialized function for it) to string. More... | |
template<typename T > | |
std::string | to_string (const T &obj, const long _precision) |
: Converts an arbitary Object to string with fixed precision More... | |
std::string XERUS_warn_unused | trim (const std::string &_string, const std::string &whitespace=" \\") |
: Removes all leading and trailing whitespaces from _string. More... | |
size_t | uTime () |
: Returns the time since epoche in microseconds. More... | |
template<class T > | |
XERUS_force_inline void | write_to_stream (std::ostream &_stream, const T &_value, FileFormat _format) |
XERUS_GENERATE_HAS_MEMBER (count) template< template< class | |
: Counts how often an element is contained in an arbitary container More... | |
Variables | |
T | _b |
thread_local std::normal_distribution< double > | defaultNormalDistribution |
thread_local std::mt19937_64 | randomEngine |
Collection of classes and functions that provide elementary functionality that is not special to xerus as a tensor library.
|
strong |
xerus::misc::__attribute__ | ( | (const) | ) |
|
inlinenoexcept |
Adds _n entries of _y to the ones of _x. I.e. x += y.
Definition at line 96 of file basicArraySupport.h.
|
inlinenoexcept |
Adds _n entries of _y, scaled by _alpha to the ones of _x. I.e. x += alpha*y.
Definition at line 107 of file basicArraySupport.h.
void xerus::misc::apply_permutation | ( | std::vector< T > & | _vec, |
const std::vector< size_t > & | _permutation | ||
) |
|
noexcept |
bool xerus::misc::approx_equal | ( | T | _a, |
T | _b | ||
) |
|
inlinenoexcept |
Copys _n entries from _y to _x, where _y and _x must be disjunkt memory regions.
For trivial copyable types this is only a slim wrapper for memcpy.
Definition at line 55 of file basicArraySupport.h.
|
inlinenoexcept |
Copys _n entries from _y to _x, allowing the accessed memry regions of _y and _x to overlap.
For trivial copyable types this is only a slim wrapper for memmove.
Definition at line 65 of file basicArraySupport.h.
|
inlinenoexcept |
Copys _n entries from _y to _x, simulationously scaling each entry by the factor _alpha. I.e x = alpha*y.
Definition at line 74 of file basicArraySupport.h.
std::vector<size_t> xerus::misc::create_sort_permutation | ( | const std::vector< T > & | _vec, |
Comparator | _comp | ||
) |
std::string xerus::misc::demangle_cxa | ( | const std::string & | _cxa | ) |
Demangles the function and class names created by gcc into a more readable format.
Definition at line 33 of file stringUtilities.cpp.
std::string xerus::misc::exec | ( | const std::string & | _cmd | ) |
Execute a given command.
_cmd | the command to execute |
Definition at line 31 of file missingFunctions.cpp.
void xerus::misc::exec | ( | const std::string & | _cmd, |
const std::string & | _stdin | ||
) |
Execute a given command and pipe _stdin to its std input,.
_cmd | the command to execute |
_stdin | the input for the program |
Definition at line 45 of file missingFunctions.cpp.
std::vector< std::string > xerus::misc::explode | ( | const std::string & | _string, |
const char | _delim | ||
) |
: Explodes a string at positions indicated by _delim.
Definition at line 64 of file stringUtilities.cpp.
double xerus::misc::find_root_bisection | ( | const std::function< double(double)> & | _f, |
double | _min, | ||
double | _max, | ||
double | _epsilon = 1e-14 |
||
) |
Definition at line 109 of file simpleNumerics.cpp.
T xerus::misc::from_string | ( | const std::string & | _s | ) |
: Creates an arbitary Object from string
Definition at line 93 of file stringFromTo.h.
XERUS_force_inline double xerus::misc::from_string< double > | ( | const std::string & | _str | ) |
Definition at line 131 of file stringFromTo.h.
XERUS_force_inline float xerus::misc::from_string< float > | ( | const std::string & | _str | ) |
Definition at line 126 of file stringFromTo.h.
XERUS_force_inline int xerus::misc::from_string< int > | ( | const std::string & | _str | ) |
Definition at line 101 of file stringFromTo.h.
XERUS_force_inline long xerus::misc::from_string< long > | ( | const std::string & | _str | ) |
Definition at line 106 of file stringFromTo.h.
XERUS_force_inline long double xerus::misc::from_string< long double > | ( | const std::string & | _str | ) |
Definition at line 136 of file stringFromTo.h.
XERUS_force_inline long long xerus::misc::from_string< long long > | ( | const std::string & | _str | ) |
Definition at line 111 of file stringFromTo.h.
XERUS_force_inline unsigned long xerus::misc::from_string< unsigned long > | ( | const std::string & | _str | ) |
Definition at line 116 of file stringFromTo.h.
XERUS_force_inline unsigned long long xerus::misc::from_string< unsigned long long > | ( | const std::string & | _str | ) |
Definition at line 121 of file stringFromTo.h.
std::string xerus::misc::get_call_stack | ( | ) |
Returns a string representation of the current call-stack (excluding the function itself).
Per default this uses the binutils library to get the following information: [address .section] filename:line (function) if all of these are available.
Definition at line 166 of file callStack.cpp.
std::pair< uintptr_t, uintptr_t > xerus::misc::get_range_of_section | ( | void * | _addr, |
std::string | _name | ||
) |
Returns the address range of the elf-section names _name as part of the executable / so file that contained _addr.
Definition at line 186 of file callStack.cpp.
|
noexcept |
|
noexcept |
double xerus::misc::integrate | ( | const std::function< double(double)> & | _f, |
double | _a, | ||
double | _b, | ||
double | _eps = std::numeric_limits<double>::epsilon() , |
||
uint | _minIter = 4 , |
||
uint | _maxIter = 6 , |
||
uint | _branchFactor = 7 , |
||
uint | _maxRecursion = 10 , |
||
bool | _relativeError = true |
||
) |
Performs a Romberg Integration (richardson extrapolation of regular riemannian sum) + adaptive refinement.
Definition at line 37 of file simpleNumerics.cpp.
double xerus::misc::integrate_segmented | ( | const std::function< double(double)> & | _f, |
double | _a, | ||
double | _b, | ||
double | _segmentation, | ||
double | _eps = 1e-8 , |
||
uint | _minIter = 4 , |
||
uint | _maxIter = 6 , |
||
uint | _branchFactor = 8 , |
||
uint | _maxRecursion = 10 |
||
) |
Definition at line 98 of file simpleNumerics.cpp.
void xerus::misc::load_from_file | ( | T & | _obj, |
const std::string & | _filename | ||
) |
T xerus::misc::load_from_file | ( | const std::string & | _filename | ) |
std::unique_ptr<T[]> xerus::misc::make_unique_array | ( | T * | _ptr | ) |
Definition at line 36 of file basicArraySupport.h.
size_t xerus::misc::mTime | ( | ) |
: Returns the time since epoche in milliseconds.
Definition at line 35 of file timeMeasure.cpp.
std::string xerus::misc::normalize_pathname | ( | const std::string & | _name | ) |
Resolves 'folder/..' occurences in pathnames.
Definition at line 44 of file stringUtilities.cpp.
std::ostream& xerus::misc::operator<< | ( | std::ostream & | _out, |
const std::tuple< Tp... > & | _tuple | ||
) |
Allow to pipe tuples to ostreams.
Definition at line 50 of file containerOutput.h.
|
noexcept |
The pipe operator allows to add everything that can be converted to string to the error_info and derived exceptions.
Definition at line 54 of file exceptions.h.
std::ostream& xerus::misc::operator<< | ( | std::ostream & | _out, |
const std::pair< first_t, second_t > & | _pair | ||
) |
Allow to pipe std::pairs to ostreams.
Definition at line 60 of file containerOutput.h.
|
noexcept |
The pipe operator allows to add everything that can be converted to string to the error_info and derived exceptions.
Definition at line 62 of file exceptions.h.
std::ostream& xerus::misc::operator<< | ( | std::ostream & | _out, |
const std::vector< item_t, rest_t... > & | _container | ||
) |
Allow to pipe normal containers to ostreams.
Definition at line 68 of file containerOutput.h.
std::ostream& xerus::misc::operator<< | ( | std::ostream & | _out, |
const std::set< item_t, rest_t... > & | _container | ||
) |
Allow to pipe std::sets to ostreams.
Definition at line 79 of file containerOutput.h.
std::ostream& xerus::misc::operator<< | ( | std::ostream & | _out, |
const std::map< T, U > & | _set | ||
) |
Allow to pipe std::maps to ostreams.
Definition at line 90 of file containerOutput.h.
|
noexcept |
|
noexcept |
|
noexcept |
|
noexcept |
thread_local std::mt19937_64 xerus::misc::randomEngine | ( | std::random_device{} | () | ) |
XERUS_force_inline void xerus::misc::read_from_stream | ( | std::istream & | _stream, |
T & | _obj, | ||
const FileFormat | _format | ||
) |
XERUS_force_inline T xerus::misc::read_from_stream | ( | std::istream & | _stream, |
const FileFormat | _format | ||
) |
std::string xerus::misc::reduce | ( | const std::string & | _string, |
const std::string & | whitespace = " \t\n\r\v" , |
||
const std::string & | fill = " " |
||
) |
: Removes all leading and trailing whitespaces from _string, and reduces all double whitespaces to one.
Definition at line 93 of file stringUtilities.cpp.
void xerus::misc::replace | ( | std::string & | _string, |
const std::string & | _search, | ||
const std::string & | _replace | ||
) |
: Replaces all occurences of _search in _string by _replace.
Definition at line 76 of file stringUtilities.cpp.
void xerus::misc::save_to_file | ( | const T & | _obj, |
const std::string & | _filename, | ||
const FileFormat | _format = FileFormat::BINARY |
||
) |
|
inlinenoexcept |
Scales _n entries of _x by the factor _alpha. I.e. x = alpha*x.
Definition at line 85 of file basicArraySupport.h.
|
inlinenoexcept |
Sets all entries equal to zero.
This is done directly by memset and therefore requires the type to be trivial.
Definition at line 45 of file basicArraySupport.h.
|
noexcept |
void xerus::misc::simultaneous_sort | ( | std::vector< KeyType > & | _keyVector, |
std::vector< DataType > & | _dataVector, | ||
Comparator | _comp | ||
) |
|
noexcept |
void xerus::misc::stream_reader | ( | std::istream & | _stream, |
T & | _obj, | ||
const FileFormat | _format | ||
) |
void xerus::misc::stream_reader | ( | std::istream & | _stream, |
std::vector< T > & | _obj, | ||
const FileFormat | _format | ||
) |
void xerus::misc::stream_reader | ( | std::istream & | _stream, |
TensorNetwork & | _obj, | ||
const FileFormat | _format | ||
) |
Restores the TensorNetwork from a stream of data.
Definition at line 1469 of file tensorNetwork.cpp.
void xerus::misc::stream_reader | ( | std::istream & | _stream, |
TTNetwork< isOperator > & | _obj, | ||
const misc::FileFormat | _format | ||
) |
Restores the TTNetwork from a stream of data.
Definition at line 1475 of file ttNetwork.cpp.
void xerus::misc::stream_reader | ( | std::istream & | _stream, |
Tensor & | _obj, | ||
const FileFormat | _format | ||
) |
tries to restore the tensor from a stream of data.
Definition at line 1807 of file tensor.cpp.
template void xerus::misc::stream_reader | ( | std::istream & | _stream, |
TTNetwork< true > & | _obj, | ||
const misc::FileFormat | _format | ||
) |
template void xerus::misc::stream_reader | ( | std::istream & | _stream, |
TTNetwork< false > & | _obj, | ||
const misc::FileFormat | _format | ||
) |
void xerus::misc::stream_writer | ( | std::ostream & | _stream, |
const T & | _value, | ||
FileFormat | _format | ||
) |
void xerus::misc::stream_writer | ( | std::ostream & | _stream, |
const std::vector< T > & | _value, | ||
FileFormat | _format | ||
) |
void xerus::misc::stream_writer | ( | std::ostream & | _stream, |
const TensorNetwork & | _obj, | ||
const FileFormat | _format | ||
) |
Pipes all information necessary to restore the current TensorNetwork into _stream.
Definition at line 1429 of file tensorNetwork.cpp.
void xerus::misc::stream_writer | ( | std::ostream & | _stream, |
const TTNetwork< isOperator > & | _obj, | ||
misc::FileFormat | _format | ||
) |
Pipes all information necessary to restore the current TensorNetwork into _stream.
Definition at line 1455 of file ttNetwork.cpp.
void xerus::misc::stream_writer | ( | std::ostream & | _stream, |
const Tensor & | _obj, | ||
const FileFormat | _format | ||
) |
pipes all information necessary to restore the current tensor into _stream.
Definition at line 1781 of file tensor.cpp.
template void xerus::misc::stream_writer | ( | std::ostream & | _stream, |
const TTNetwork< true > & | _obj, | ||
misc::FileFormat | _format | ||
) |
template void xerus::misc::stream_writer | ( | std::ostream & | _stream, |
const TTNetwork< false > & | _obj, | ||
misc::FileFormat | _format | ||
) |
|
static |
Definition at line 41 of file stringFromTo.h.
|
static |
Definition at line 45 of file stringFromTo.h.
|
static |
Definition at line 49 of file stringFromTo.h.
std::string xerus::misc::to_string | ( | const T & | obj | ) |
: Converts any object (which has no specialized function for it) to string.
Definition at line 69 of file stringFromTo.h.
std::string xerus::misc::to_string | ( | const T & | obj, |
const long | _precision | ||
) |
: Converts an arbitary Object to string with fixed precision
Definition at line 80 of file stringFromTo.h.
std::string xerus::misc::trim | ( | const std::string & | _string, |
const std::string & | whitespace = " \t\n\r\v" |
||
) |
: Removes all leading and trailing whitespaces from _string.
Definition at line 84 of file stringUtilities.cpp.
size_t xerus::misc::uTime | ( | ) |
: Returns the time since epoche in microseconds.
Definition at line 30 of file timeMeasure.cpp.
XERUS_force_inline void xerus::misc::write_to_stream | ( | std::ostream & | _stream, |
const T & | _value, | ||
FileFormat | _format | ||
) |
xerus::misc::XERUS_GENERATE_HAS_MEMBER | ( | count | ) |
: Counts how often an element is contained in an arbitary container
T xerus::misc::_b |
Definition at line 45 of file simpleNumerics.h.
thread_local std::normal_distribution< double > xerus::misc::defaultNormalDistribution |
Definition at line 30 of file random.cpp.
thread_local std::mt19937_64 xerus::misc::randomEngine |