// In header: <alps/model/hamiltonian_matrix.hpp>
template<typename M, typename G = typename graph_helper<>::graph_type>
class hamiltonian_matrix {
public:
// types
typedef M matrix_type;
typedef matrix_type::value_type value_type;
typedef graph_helper::graph_type graph_type;
typedef graph_helper::site_descriptor site_descriptor;
typedef graph_helper::bond_descriptor bond_descriptor;
typedef graph_helper::site_iterator site_iterator;
typedef graph_helper::bond_iterator bond_iterator;
typedef graph_helper::vector_type vector_type;
typedef model_helper::basis_descriptor_type basis_descriptor_type;
typedef basis_states< short > basis_states_type;
typedef bloch_basis_states< short > bloch_basis_states_type;
typedef basis_states_type::value_type state_type;
// construct/copy/destruct
hamiltonian_matrix(Parameters const &);
// public member functions
void set_parameters(Parameters const &) ;
matrix_type & matrix() ;
const matrix_type & matrix() const;
std::size_t dimension() const;
void dostep() ;
template<typename STATES, typename V, typename W>
void apply_operator(const STATES &, const SiteOperator &, site_descriptor,
const V &, W &) const;
template<typename V, typename W>
void apply_operator(const SiteOperator &, site_descriptor, const V &, W &) const;
template<typename V, typename W>
void apply_operator(const BondOperator &, bond_descriptor, const V &, W &) const;
template<typename V, typename W>
void apply_operator(const BondOperator &, site_descriptor,
site_descriptor, const V &, W &) const;
template<typename V, typename W>
void apply_operator(const boost::multi_array< std::pair< value_type, bool >, 4 > &,
site_descriptor, site_descriptor, const V &, W &) const;
template<typename STATES, typename V, typename W>
void apply_operator(const STATES &,
const boost::multi_array< std::pair< value_type, bool >, 4 > &,
site_descriptor, site_descriptor, const V &, W &) const;
template<typename V, typename W>
void apply_operator(const SiteOperator &, const V &, W &) const;
template<typename V, typename W>
void apply_operator(const BondOperator &, const V &, W &) const;
template<typename V, typename W>
void apply_operator(const GlobalOperator &, const V &, W &) const;
template<typename MM, typename OP> MM operator_matrix(const OP &) const;
template<typename MM, typename OP>
void add_operator_matrix(MM &, const OP &) const;
template<typename MM, typename OP, typename D>
MM operator_matrix(const OP &, D) const;
template<typename MM, typename OP, typename D>
void add_operator_matrix(MM &, const OP &, D) const;
template<typename MM, typename OP>
MM operator_matrix(const OP &, site_descriptor, site_descriptor) const;
template<typename MM, typename OP>
void add_operator_matrix(MM &, const OP &, site_descriptor,
site_descriptor) const;
boost::multi_array< value_type, 2 >
local_matrix(const SiteOperator &, site_descriptor) const;
boost::multi_array< std::pair< value_type, bool >, 4 >
local_matrix(const BondOperator &, const bond_descriptor &) const;
boost::multi_array< std::pair< value_type, bool >, 4 >
local_matrix(const BondOperator &, const site_descriptor &,
const site_descriptor &) const;
template<typename V, typename W>
void apply_operator(const std::string &, bond_descriptor, const V &, W &) const;
template<typename V, typename W>
void apply_operator(const std::string &, site_descriptor, const V &, W &) const;
template<typename V, typename W>
void apply_operator(const std::string &, const V &, W &) const;
// protected member functions
void build() const;
void build_basis() const;
bool uses_translation_invariance() const;
};