ALPS Home Libraries License Support People ALPS Web Site

PrevUpHomeNext

Class template hypercubic_lattice

alps::hypercubic_lattice

Synopsis

// In header: <alps/lattice/hypercubic.h>

template<typename BASE, typename EX> 
class hypercubic_lattice {
public:
  // types
  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;             

  // member classes/structs/unions

  class cell_iterator {
  public:
    // types
    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;

    // construct/copy/destruct
    cell_iterator();
    cell_iterator(const lattice_type &, const offset_type &);

    // public member functions
    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:
    // construct/copy/destruct
    momentum_iterator(cell_iterator = cell_iterator());

    // public member functions
    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);

    // private member functions
    void set_k() const;
  };

  // construct/copy/destruct
  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 > &);

  // public member functions
  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;

  // private member functions
  void fill_extent();
};

Description

hypercubic_lattice public construct/copy/destruct

  1. hypercubic_lattice();
  2. template<typename BASE2, typename EX2> 
      hypercubic_lattice(const hypercubic_lattice< BASE2, EX2 > & l);
  3. hypercubic_lattice(const parent_lattice_type & p, size_type length, 
                       const std::string & bc = "periodic");
  4. template<typename InputIterator> 
      hypercubic_lattice(const parent_lattice_type & p, InputIterator first, 
                         InputIterator last, const std::string & bc = "periodic");
  5. template<typename InputIterator2> 
      hypercubic_lattice(const parent_lattice_type & p, size_type length, 
                         InputIterator2 first2, InputIterator2 last2);
  6. template<typename InputIterator, typename InputIterator2> 
      hypercubic_lattice(const parent_lattice_type & p, InputIterator first, 
                         InputIterator last, InputIterator2 first2, 
                         InputIterator2 last2);
  7. template<typename BASE2, typename EX2> 
      hypercubic_lattice& operator=(const hypercubic_lattice< BASE2, EX2 > & l);

hypercubic_lattice public member functions

  1. std::pair< cell_iterator, cell_iterator > cells() const;
  2. size_type volume() const;
  3. size_type index(const cell_descriptor & c) const;
  4. bool on_lattice(const cell_descriptor & c) const;
  5. cell_descriptor cell(size_type i) const;
  6. cell_descriptor cell(offset_type o) const;
  7. std::pair< bool, boundary_crossing_type > 
    shift(offset_type & o, const offset_type & s) const;
  8. const std::string & boundary(unsigned int dim) const;
  9. const std::vector< std::string > & boundary() const;
  10. extent_type::value_type extent(unsigned int dim) const;
  11. const extent_type & extent() const;
  12. std::vector< std::string > distance_labels(int precision = 0) const;
  13. std::vector< std::string > momenta_labels(int precision = 0) const;
  14. std::vector< unsigned int > distance_multiplicities() const;
  15. std::size_t num_distances() const;
  16. std::size_t distance(const offset_type & x, const offset_type & y) const;
  17. std::pair< momentum_iterator, momentum_iterator > momenta() const;
  18. std::vector< int > translation_directions() const;
  19. std::vector< vector_type > translation_momenta() const;
  20. std::vector< std::pair< std::complex< double >, std::vector< std::size_t > > > 
    translations(const vector_type & k) const;

hypercubic_lattice private member functions

  1. void fill_extent();
Copyright © 1994, 2002-2005 Matthias Troyer, Synge Todo

PrevUpHomeNext