triqs::hilbert_space::state<HilbertSpace,ScalarType,false>::foreach

#include <triqs/hilbert_space.hpp>

Synopsis

template<typename w_max>
void foreach (state<type-parameter-0-0, type-parameter-0-1, false> const & st, w_max l)

Apply a callable object to all amplitudes of a state

The callable must take two arguments, 1) index of the basis Fock state in the associated Hilbert space, and 2) the corresponding amplitude.

Template parameters

  • w_max Type of the callable object

Parameters

  • st State object

  • l Callable object