Class template hypercubic_lattice
alps::hypercubic_lattice
Synopsis
template<typename BASE, typename EX>
class hypercubic_lattice {
public:
typedef hypercubic_lattice< BASE, EX > lattice_type;
typedef BASE parent_lattice_type;
typedef lattice_traits< parent_lattice_type >::unit_cell_type unit_cell_type;
typedef lattice_traits< parent_lattice_type >::cell_descriptor cell_descriptor;
typedef lattice_traits< parent_lattice_type >::offset_type offset_type;
typedef EX extent_type;
typedef lattice_traits< parent_lattice_type >::basis_vector_iterator basis_vector_iterator;
typedef lattice_traits< parent_lattice_type >::vector_type vector_type;
typedef boundary_crossing boundary_crossing_type;
typedef std::vector< unsigned int > distance_type;
typedef int size_type;
class cell_iterator {
public:
typedef std::ptrdiff_t difference_type;
typedef cell_descriptor value_type;
typedef cell_descriptor * pointer;
typedef cell_descriptor & reference;
typedef std::forward_iterator_tag iterator_category;
cell_iterator();
cell_iterator(const lattice_type &, const offset_type &);
const cell_iterator & operator++();
cell_iterator operator++(int);
bool operator==(const cell_iterator &);
bool operator!=(const cell_iterator &);
cell_descriptor operator*() const;
};
class momentum_iterator :
public alps::hypercubic_lattice< BASE, EX >::cell_iterator
{
public:
momentum_iterator(cell_iterator = cell_iterator());
const vector_type & operator*() const;
const vector_type * operator->() const;
std::complex< double > phase(const vector_type &) const;
const momentum_iterator & operator++();
const momentum_iterator & operator++(int);
void set_k() const;
};
hypercubic_lattice();
template<typename BASE2, typename EX2>
hypercubic_lattice(const hypercubic_lattice< BASE2, EX2 > &);
hypercubic_lattice(const parent_lattice_type &, size_type,
const std::string & = "periodic");
template<typename InputIterator>
hypercubic_lattice(const parent_lattice_type &, InputIterator,
InputIterator, const std::string & = "periodic");
template<typename InputIterator2>
hypercubic_lattice(const parent_lattice_type &, size_type, InputIterator2,
InputIterator2);
template<typename InputIterator, typename InputIterator2>
hypercubic_lattice(const parent_lattice_type &, InputIterator,
InputIterator, InputIterator2, InputIterator2);
template<typename BASE2, typename EX2>
hypercubic_lattice& operator=(const hypercubic_lattice< BASE2, EX2 > &);
std::pair< cell_iterator, cell_iterator > cells() const;
size_type volume() const;
size_type index(const cell_descriptor &) const;
bool on_lattice(const cell_descriptor &) const;
cell_descriptor cell(size_type) const;
cell_descriptor cell(offset_type) const;
std::pair< bool, boundary_crossing_type >
shift(offset_type &, const offset_type &) const;
const std::string & boundary(unsigned int) const;
const std::vector< std::string > & boundary() const;
extent_type::value_type extent(unsigned int) const;
const extent_type & extent() const;
std::vector< std::string > distance_labels(int = 0) const;
std::vector< std::string > momenta_labels(int = 0) const;
std::vector< unsigned int > distance_multiplicities() const;
std::size_t num_distances() const;
std::size_t distance(const offset_type &, const offset_type &) const;
std::pair< momentum_iterator, momentum_iterator > momenta() const;
std::vector< int > translation_directions() const;
std::vector< vector_type > translation_momenta() const;
std::vector< std::pair< std::complex< double >, std::vector< std::size_t > > >
translations(const vector_type &) const;
void fill_extent();
};
Description
hypercubic_lattice
public
construct/copy/destruct
hypercubic_lattice();
template<typename BASE2, typename EX2>
hypercubic_lattice(const hypercubic_lattice< BASE2, EX2 > & l);
hypercubic_lattice(const parent_lattice_type & p, size_type length,
const std::string & bc = "periodic");
template<typename InputIterator>
hypercubic_lattice(const parent_lattice_type & p, InputIterator first,
InputIterator last, const std::string & bc = "periodic");
template<typename InputIterator2>
hypercubic_lattice(const parent_lattice_type & p, size_type length,
InputIterator2 first2, InputIterator2 last2);
template<typename InputIterator, typename InputIterator2>
hypercubic_lattice(const parent_lattice_type & p, InputIterator first,
InputIterator last, InputIterator2 first2,
InputIterator2 last2);
template<typename BASE2, typename EX2>
hypercubic_lattice& operator=(const hypercubic_lattice< BASE2, EX2 > & l);
hypercubic_lattice
public member functions
std::pair< cell_iterator, cell_iterator > cells() const;
size_type volume() const;
size_type index(const cell_descriptor & c) const;
bool on_lattice(const cell_descriptor & c) const;
cell_descriptor cell(size_type i) const;
cell_descriptor cell(offset_type o) const;
std::pair< bool, boundary_crossing_type >
shift(offset_type & o, const offset_type & s) const;
const std::string & boundary(unsigned int dim) const;
const std::vector< std::string > & boundary() const;
extent_type::value_type extent(unsigned int dim) const;
const extent_type & extent() const;
std::vector< std::string > distance_labels(int precision = 0) const;
std::vector< std::string > momenta_labels(int precision = 0) const;
std::vector< unsigned int > distance_multiplicities() const;
std::size_t num_distances() const;
std::size_t distance(const offset_type & x, const offset_type & y) const;
std::pair< momentum_iterator, momentum_iterator > momenta() const;
std::vector< int > translation_directions() const;
std::vector< vector_type > translation_momenta() const;
std::vector< std::pair< std::complex< double >, std::vector< std::size_t > > >
translations(const vector_type & k) const;
hypercubic_lattice
private member functions