20 #ifndef SELDON_FILE_COMMON_HXX
26 #ifdef SELDON_WITH_HDF5
33 T conjugate(
const T& x);
36 complex<T> conjugate(
const complex<T>& x);
39 T realpart(
const T& x);
42 T realpart(
const complex<T>& x);
50 void PrintArray(T* v,
int lgth);
61 std::ostringstream output_;
66 operator std::string()
const;
81 std::string
to_str(
const T& input);
84 void to_num(std::string s, T& num);
87 T to_num(std::string s);
103 typedef std::complex<T> Tcplx;
112 typedef std::complex<T> Tcplx;
116 void SetComplexZero(T& number);
119 void SetComplexZero(std::complex<T>& number);
122 void SetComplexOne(T& number);
125 void SetComplexOne(std::complex<T>& number);
144 template <
class T0,
class T1>
162 #ifdef SELDON_WITH_HDF5
164 hid_t GetH5Type(T& input);
168 int FinalizeSeldon();
172 #include "CommonInline.cxx"
173 #define SELDON_FILE_COMMON_HXX
workaround class to retrieve double type from complex<double>
string GetBaseString(const string &nom)
returns base of a string
const TinyMatrixSum< T, m, n, E1, E2 > operator+(const TinyMatrixExpression< T, m, n, E1 > &u, const TinyMatrixExpression< T, m, n, E2 > &v)
returns u+v
std::string to_str(const T &input)
Converts most types to string.
This class helps formatting C++ strings on the fly.
T absSquare(const T &x)
returns the square modulus of z
void InitSeldon(int argc, char **argv)
Function to call in parallel to initialize MPI.
string GetExtension(const string &nom)
returns extension of a string
ostream & operator<<(ostream &out, const Array< T, N, Allocator > &A)
operator<< overloaded for a 3D array.
void SetComplexReal(int n, std::complex< T > &number)
Sets a complex number to (n, 0).
T ComplexAbs(const T &val)
returns absolute value of val