.. Generated automatically by cpp2rst .. highlight:: c .. role:: red .. role:: green .. role:: param .. _triqs__hilbert_space__stateLTHilbertSpace_ScalarType_trueGT__foreach: triqs::hilbert_space::state::foreach ================================================================== *#include * **Synopsis** .. rst-class:: cppsynopsis | :green:`template` | void :red:`foreach` (:ref:`state\ ` const & :param:`st`, w_max :param:`l`) Apply a callable object to **non-vanishing** 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 ^^^^^^^^^^^^^^^^^^^ * :param:`w_max` Type of the callable object Parameters ^^^^^^^^^^ * :param:`st` State object * :param:`l` Callable object