#include <lattice.hpp>
Definition at line 141 of file lattice.hpp.
std::vector<int> SquareLattice::all |
( |
int |
p | ) |
const |
|
inlinevirtual |
Implements lattice_impl.
Definition at line 171 of file lattice.hpp.
173 std::vector<int> ret =
forward(p);
174 if (p >= 1 && p % W_ != 0)
std::vector< int > forward(int p) const
std::vector<int> SquareLattice::forward |
( |
int |
p | ) |
const |
|
inlinevirtual |
Implements lattice_impl.
Definition at line 156 of file lattice.hpp.
158 std::vector<int> ret;
159 if (p+1 < L_*W_ && (p+1) % W_ != 0)
template<class T >
T lattice_impl::get_prop |
( |
std::string |
property, |
|
|
pos_t |
site |
|
) |
| const |
|
inlineinherited |
Definition at line 49 of file lattice.h.
52 return boost::any_cast<T>(
get_prop_(property, std::vector<pos_t>(1, site)));
virtual boost::any get_prop_(std::string const &, std::vector< pos_t > const &) const =0
template<class T >
T lattice_impl::get_prop |
( |
std::string |
property, |
|
|
pos_t |
bond1, |
|
|
pos_t |
bond2 |
|
) |
| const |
|
inlineinherited |
Definition at line 55 of file lattice.h.
58 std::vector<pos_t> v(2);
59 v[0] = bond1; v[1] = bond2;
60 return boost::any_cast<T>(
get_prop_(property, v));
virtual boost::any get_prop_(std::string const &, std::vector< pos_t > const &) const =0
template<class T >
T lattice_impl::get_prop |
( |
std::string |
property, |
|
|
std::vector< pos_t > const & |
positions |
|
) |
| const |
|
inlineinherited |
Definition at line 63 of file lattice.h.
66 return boost::any_cast<T>(
get_prop_(property, positions));
virtual boost::any get_prop_(std::string const &, std::vector< pos_t > const &) const =0
boost::any SquareLattice::get_prop_ |
( |
std::string const & |
property, |
|
|
std::vector< pos_t > const & |
pos |
|
) |
| const |
|
inlinevirtual |
Implements lattice_impl.
Definition at line 190 of file lattice.hpp.
192 if (property ==
"label" && pos.size() == 1)
193 return boost::any( site_label(pos[0]) );
194 else if (property ==
"label" && pos.size() == 2)
195 return boost::any( bond_label(pos[0], pos[1]) );
196 else if (property ==
"type" && pos.size() == 1)
197 return boost::any( 0 );
198 else if (property ==
"type" && pos.size() == 2)
199 return boost::any( 0 );
200 else if (property ==
"x" && pos.size() == 1)
201 return boost::any( x(pos[0]) );
202 else if (property ==
"y" && pos.size() == 1)
203 return boost::any( y(pos[0]) );
204 else if (property ==
"wraps_pbc" && pos.size() == 2)
205 return boost::any(
false );
207 std::ostringstream ss;
208 ss <<
"No property '" <<
property <<
"' with " << pos.size() <<
" points implemented.";
209 throw std::runtime_error(ss.str());
int SquareLattice::maximum_vertex_type |
( |
| ) |
const |
|
inlinevirtual |
int SquareLattice::size |
( |
| ) |
const |
|
inlinevirtual |
The documentation for this class was generated from the following file: