- new parameter class :
parameters are viewed as form, built in C++, and filled in C++/python.
Each field of the form as a precise C++ type (erased using standard techniques).
First tests ok, to be reread/checked.
TODO : serialization is commented. Lead to long compilation time & large code
due to boost::serialization. Use h5 when possible.
- wrapper :
- separated the converters of the wrapped type in the TRIQS library
- necessary for parameters (it used outside an .so) and potentially
other codes, outside an .so module
When constructing the last unit vector in 2D, the sanity check was wrong because of usage of abs instead of std::abs.
Added method energy_on_bz_path_2 that returns the energy *matrix* at each k point on a given path instead of the eigenvalues of this matrix. The name of the function should be changed (to energy_matrix_on_bz_path?)
Renaming energies_on_bz_path_2 to energy_matrix_on_bz_path
- h5/make_h5.... only used in parameters.
- old boost includes before C++11
- remove boost serialization, make macro TRIQS_MAKE_NVP temporarely
- remove boost::is_complex (can be written in 2 lines...)
- move some lib in cpp
- fold was not correct in e.g. passing an int as init instead of a
double (was leading to narrowing in return).
- better return type deduction.
- there was an error in the doc (order of argument in the lambda !)
- add a more complex example (Frobenius norm of matrices).
- when the ratio returned by an attempt of a move is infinite,
previous code was just throwing TRIQS_RUNTIME_ERROR.
- Now when the ratio is infinite, it is replaced by a large number
(>1 is enough for metropolis), and the sign is properly updated
using std::signbit.
- NB :
- a double/float in C++ can be : normal/ zero/ nan/ infinite / subnormal.
Here, the code will recover only from infinite case.
- std::signbit works for infinite (according to standard).
Changed operator()(int, int...) && for array, and views.
- For const_view and regular type, returns value_type (i.e. a copy).
NB : does make a copy, not a move. Ok for scalar type. TODO: think for complicated types.
This allows codes like :
f(x)(0,0) where f : x-> matrix or const_view
to be correct in clef expression evaluation.
- For _view : return a value_type &, as before to allow :
A(....)(0,0) = rhs;
It is not possible to detect dangling refs in that case at compile time.
Added a security in TRIQS_ARRAYS_DEBUG mode to detect a dangling ref at run time,
i.e. the case where the view is "unique" (ref count ==1).
This would be a quite bad design anyway ...
- also :
- clean operator[] for vector (old workaround for old gcc...)
- add IsView flag in ISP impl class, for the impl. of operator() &&
mesh_pt should NOT be done directly by (),
it should be casted to matsubara_freq.
Removed an old line of code which we forgot to clean
when introducing matsubara_freq
A(i_)(om_) << ...
for A an array of gf was not working.
Modified the auto_assign of arrays to handle the case when the object
in the array is itself autoassigned.
Using the model of std::vector adapter for clef, which works.
Also fixed the gf for a little details (gf_impl is usually in the expression tree, not gf).
- bool at_end() for a mesh point means AFTER the last point ,
as end in STL. It was not correct ( +1 missing).
- also the at_end was not computed in the mesh product.
- it slightly changes the test_fit_tail --> just changed the output.
--> did this bug affect other functions/codes ?
- correct previous commit (for scalar gf, the new check was not compiling)
- correct windowing of linear mesh (left point corrected as right point for rounding error