![]() |
Home | Libraries | License | Support | People | ALPS Web Site |
alps::graph_helper
// In header: <alps/lattice/graph_helper.h> template<typename G = coordinate_graph_type> class graph_helper : public alps::LatticeLibrary { public: // types typedef G graph_type; typedef lattice_graph< hypercubic_lattice< coordinate_lattice< simple_lattice< GraphUnitCell > > >, graph_type > lattice_type; typedef graph_traits< graph_type >::vertex_iterator vertex_iterator; typedef graph_traits< graph_type >::edge_iterator edge_iterator; typedef graph_traits< graph_type >::out_edge_iterator out_edge_iterator; typedef graph_traits< graph_type >::in_edge_iterator in_edge_iterator; typedef graph_traits< graph_type >::edge_descriptor edge_descriptor; typedef graph_traits< graph_type >::vertex_descriptor vertex_descriptor; typedef graph_traits< graph_type >::vertices_size_type vertices_size_type; typedef graph_traits< graph_type >::edges_size_type edges_size_type; typedef graph_traits< graph_type >::degree_size_type degree_size_type; typedef graph_traits< graph_type >::adjacency_iterator adjacency_iterator; typedef graph_traits< graph_type >::site_iterator site_iterator; typedef graph_traits< graph_type >::bond_iterator bond_iterator; typedef graph_traits< graph_type >::neighbor_bond_iterator neighbor_bond_iterator; typedef graph_traits< graph_type >::bond_descriptor bond_descriptor; typedef graph_traits< graph_type >::site_descriptor site_descriptor; typedef graph_traits< graph_type >::sites_size_type sites_size_type; typedef graph_traits< graph_type >::bonds_size_type bonds_size_type; typedef graph_traits< graph_type >::neighbors_size_type neighbors_size_type; typedef graph_traits< graph_type >::neighbor_iterator neighbor_iterator; typedef lattice_traits< lattice_type >::unit_cell_type unit_cell_type; typedef lattice_traits< lattice_type >::cell_descriptor cell_descriptor; typedef lattice_traits< lattice_type >::offset_type offset_type; typedef lattice_traits< lattice_type >::vector_type vector_type; typedef lattice_traits< lattice_type >::size_type size_type; typedef lattice_traits< lattice_type >::cell_iterator cell_iterator; typedef lattice_traits< lattice_type >::momentum_iterator momentum_iterator; typedef lattice_traits< lattice_type >::basis_vector_iterator basis_vector_iterator; typedef lattice_traits< lattice_type >::boundary_crossing_type boundary_crossing_type; typedef property_map< edge_type_t, graph_type, type_type >::const_type edge_type_map_type; typedef edge_type_map_type bond_type_map_type; typedef property_map< vertex_type_t, graph_type, type_type >::const_type vertex_type_map_type; typedef vertex_type_map_type site_type_map_type; typedef boost::vector_property_map< type_type > inhomogeneous_vertex_type_map_type; typedef inhomogeneous_vertex_type_map_type inhomogeneous_site_type_map_type; typedef boost::vector_property_map< type_type, typename property_map< edge_index_t, graph_type, type_type >::const_type > inhomogeneous_edge_type_map_type; typedef inhomogeneous_edge_type_map_type inhomogeneous_bond_type_map_type; // construct/copy/destruct graph_helper(std::istream &, const Parameters &); graph_helper(const alps::Parameters &); graph_helper(const graph_helper &); const graph_helper & operator=(const graph_helper &); ~graph_helper(); // public member functions graph_type & graph(); const graph_type & graph() const; template<typename H> graph_traits< H >::graph_type & graph(H &) const; template<typename H> const graph_traits< H >::graph_type & graph(const H &) const; lattice_type & lattice(); const lattice_type & lattice() const; vertices_size_type num_vertices() const; edges_size_type num_edges() const; std::pair< vertex_iterator, vertex_iterator > vertices() const; std::pair< edge_iterator, edge_iterator > edges() const; degree_size_type out_degree(const vertex_descriptor &) const; degree_size_type in_degree(const vertex_descriptor &) const; degree_size_type degree(const vertex_descriptor &) const; std::pair< out_edge_iterator, out_edge_iterator > out_edges(const vertex_descriptor &) const; std::pair< in_edge_iterator, in_edge_iterator > in_edges(const vertex_descriptor &) const; std::pair< adjacency_iterator, adjacency_iterator > adjacent_vertices(const vertex_descriptor &) const; vertex_descriptor vertex(vertices_size_type) const; site_descriptor source(const bond_descriptor &) const; site_descriptor target(const bond_descriptor &) const; template<typename H> graph_traits< H >::vertices_size_type num_vertices(const H &) const; template<typename H> graph_traits< H >::edges_size_type num_edges(const H &) const; template<typename H> std::pair< typename graph_traits< H >::vertex_iterator, typename graph_traits< H >::vertex_iterator > vertices(const H &) const; template<typename H> std::pair< typename graph_traits< H >::edge_iterator, typename graph_traits< H >::edge_iterator > edges(const H &) const; template<typename H> graph_traits< H >::degree_size_type out_degree(const typename graph_traits< H >::vertex_descriptor &, const H &) const; template<typename H> graph_traits< H >::degree_size_type in_degree(const typename graph_traits< H >::vertex_descriptor &, const H &) const; template<typename H> graph_traits< H >::degree_size_type degree(const typename graph_traits< H >::vertex_descriptor &, const H &) const; template<typename H> std::pair< typename graph_traits< H >::out_edge_iterator, typename graph_traits< H >::out_edge_iterator > out_edges(const typename graph_traits< H >::vertex_descriptor &, const H &) const; template<typename H> std::pair< typename graph_traits< H >::in_edge_iterator, typename graph_traits< H >::in_edge_iterator > in_edges(const typename graph_traits< H >::vertex_descriptor &, const H &) const; template<typename H> std::pair< typename graph_traits< H >::adjacency_iterator, typename graph_traits< H >::adjacency_iterator > adjacent_vertices(const typename graph_traits< H >::vertex_descriptor &, const H &) const; template<typename H> graph_traits< H >::vertex_descriptor vertex(typename graph_traits< H >::vertices_size_type, const H &) const; template<typename H> graph_traits< H >::site_descriptor source(const typename graph_traits< H >::bond_descriptor &, const H &) const; template<typename H> graph_traits< H >::site_descriptor target(const typename graph_traits< H >::bond_descriptor &, const H &) const; sites_size_type num_sites() const; bonds_size_type num_bonds() const; std::pair< site_iterator, site_iterator > sites() const; site_descriptor site(sites_size_type) const; std::pair< bond_iterator, bond_iterator > bonds() const; bond_descriptor bond(bonds_size_type) const; neighbors_size_type num_neighbors(const site_descriptor &) const; std::pair< neighbor_bond_iterator, neighbor_bond_iterator > neighbor_bonds(const site_descriptor &) const; std::pair< neighbor_iterator, neighbor_iterator > neighbors(const site_descriptor &) const; site_descriptor neighbor(const site_descriptor &, neighbors_size_type) const; template<typename H> graph_traits< H >::sites_size_type num_sites(const H &) const; template<typename H> graph_traits< H >::bonds_size_type num_bonds(const H &) const; template<typename H> std::pair< typename graph_traits< H >::site_iterator, typename graph_traits< H >::site_iterator > sites(const H &) const; template<typename H> graph_traits< H >::site_descriptor site(typename graph_traits< H >::sites_size_type, const H &) const; template<typename H> std::pair< typename graph_traits< H >::bond_iterator, typename graph_traits< H >::bond_iterator > bonds(const H &) const; template<typename H> graph_traits< H >::bond_descriptor bond(typename graph_traits< H >::bonds_size_type, const H &) const; template<typename H> graph_traits< H >::neighbors_size_type num_neighbors(const typename graph_traits< H >::site_descriptor &, const H &) const; template<typename H> std::pair< typename graph_traits< H >::neighbor_bond_iterator, typename graph_traits< H >::neighbor_bond_iterator > neighbor_bonds(const typename graph_traits< H >::site_descriptor &, const H &) const; template<typename H> std::pair< typename graph_traits< H >::neighbor_iterator, typename graph_traits< H >::neighbor_iterator > neighbors(const typename graph_traits< H >::site_descriptor &, const H &) const; template<typename H> graph_traits< H >::site_descriptor neighbor(const typename graph_traits< H >::site_descriptor &, typename graph_traits< H >::neighbors_size_type, const H &) const; double parity(const site_descriptor &) const; bool is_bipartite() const; vertex_type_map_type vertex_type_map() const; site_type_map_type site_type_map() const; edge_type_map_type edge_type_map() const; bond_type_map_type bond_type_map() const; type_type vertex_type(const vertex_descriptor &) const; type_type site_type(const site_descriptor &) const; type_type edge_type(const edge_descriptor &) const; type_type bond_type(const bond_descriptor &) const; bool inhomogeneous() const; bool inhomogeneous_vertices() const; bool inhomogeneous_sites() const; bool inhomogeneous_edges() const; bool inhomogeneous_bonds() const; inhomogeneous_vertex_type_map_type inhomogeneous_vertex_type_map() const; inhomogeneous_site_type_map_type inhomogeneous_site_type_map() const; inhomogeneous_edge_type_map_type inhomogeneous_edge_type_map() const; inhomogeneous_bond_type_map_type inhomogeneous_bond_type_map() const; type_type inhomogeneous_vertex_type(const vertex_descriptor &) const; type_type inhomogeneous_site_type(const site_descriptor &) const; type_type inhomogeneous_edge_type(const edge_descriptor &) const; type_type inhomogeneous_bond_type(const bond_descriptor &) const; const vector_type & coordinate(const site_descriptor &) const; std::string coordinate_string(const site_descriptor &, int = 0) const; const vector_type & bond_vector(const bond_descriptor &) const; const vector_type & bond_vector_relative(const bond_descriptor &) const; std::size_t dimension() const; std::pair< momentum_iterator, momentum_iterator > momenta() const; void throw_if_xyz_defined(const Parameters &, const vertex_descriptor &) const; void throw_if_xyz_defined(const Parameters &, const edge_descriptor &) const; Parameters coordinate_as_parameter(const edge_descriptor &) const; Parameters coordinate_as_parameter(const vertex_descriptor &) const; size_type volume() const; const unit_cell_type & unit_cell() const; cell_descriptor cell(const offset_type &) const; std::pair< cell_iterator, cell_iterator > cells() const; const offset_type & offset(const cell_descriptor &) const; bool on_lattice(const offset_type &) const; std::pair< bool, boundary_crossing_type > shift(offset_type &, const offset_type &) const; size_type cell_index(const cell_descriptor &) const; size_type vertex_index(const vertex_descriptor &) const; size_type edge_index(const edge_descriptor &) const; size_type index(const cell_descriptor &) const; size_type index(const vertex_descriptor &) const; size_type index(const edge_descriptor &) const; std::pair< basis_vector_iterator, basis_vector_iterator > basis_vectors() const; std::pair< basis_vector_iterator, basis_vector_iterator > reciprocal_basis_vectors() const; vector_type origin(const cell_descriptor &) const; vector_type coordinate(const cell_descriptor &, const vector_type &) const; vector_type momentum(const vector_type &) const; size_type num_distances() const; std::vector< unsigned int > distance_multiplicities() const; std::vector< std::string > momenta_labels(int = 0) const; std::vector< std::string > distance_labels(int = 0) const; std::string site_label(site_descriptor const &, int = 0) const; std::vector< std::string > site_labels(int = 0) const; std::string bond_labels(bond_descriptor const &, int = 0) const; std::vector< std::string > bond_labels(int = 0) const; size_type distance(vertex_descriptor, vertex_descriptor) const; void calculate_distances() const; std::vector< std::pair< std::complex< double >, std::vector< std::size_t > > > translations(const vector_type &) const; std::vector< int > translation_directions() const; std::vector< vector_type > translation_momenta() const; // private member functions graph_type * make_graph(const Parameters &); const graph_type & const_graph() const; };
graph_helper
public
construct/copy/destructgraph_helper(std::istream & in, const Parameters & p);
graph_helper(const alps::Parameters & p);
graph_helper(const graph_helper & o);
const graph_helper & operator=(const graph_helper &);
~graph_helper();
graph_helper
public member functionsgraph_type & graph();
const graph_type & graph() const;
template<typename H> graph_traits< H >::graph_type & graph(H & g) const;
template<typename H> const graph_traits< H >::graph_type & graph(const H & g) const;
lattice_type & lattice();
const lattice_type & lattice() const;
vertices_size_type num_vertices() const;
edges_size_type num_edges() const;
std::pair< vertex_iterator, vertex_iterator > vertices() const;
std::pair< edge_iterator, edge_iterator > edges() const;
degree_size_type out_degree(const vertex_descriptor & v) const;
degree_size_type in_degree(const vertex_descriptor & v) const;
degree_size_type degree(const vertex_descriptor & v) const;
std::pair< out_edge_iterator, out_edge_iterator > out_edges(const vertex_descriptor & v) const;
std::pair< in_edge_iterator, in_edge_iterator > in_edges(const vertex_descriptor & v) const;
std::pair< adjacency_iterator, adjacency_iterator > adjacent_vertices(const vertex_descriptor & v) const;
vertex_descriptor vertex(vertices_size_type i) const;
site_descriptor source(const bond_descriptor & b) const;
site_descriptor target(const bond_descriptor & b) const;
template<typename H> graph_traits< H >::vertices_size_type num_vertices(const H & g) const;
template<typename H> graph_traits< H >::edges_size_type num_edges(const H & g) const;
template<typename H> std::pair< typename graph_traits< H >::vertex_iterator, typename graph_traits< H >::vertex_iterator > vertices(const H & g) const;
template<typename H> std::pair< typename graph_traits< H >::edge_iterator, typename graph_traits< H >::edge_iterator > edges(const H & g) const;
template<typename H> graph_traits< H >::degree_size_type out_degree(const typename graph_traits< H >::vertex_descriptor & v, const H & g) const;
template<typename H> graph_traits< H >::degree_size_type in_degree(const typename graph_traits< H >::vertex_descriptor & v, const H & g) const;
template<typename H> graph_traits< H >::degree_size_type degree(const typename graph_traits< H >::vertex_descriptor & v, const H & g) const;
template<typename H> std::pair< typename graph_traits< H >::out_edge_iterator, typename graph_traits< H >::out_edge_iterator > out_edges(const typename graph_traits< H >::vertex_descriptor & v, const H & g) const;
template<typename H> std::pair< typename graph_traits< H >::in_edge_iterator, typename graph_traits< H >::in_edge_iterator > in_edges(const typename graph_traits< H >::vertex_descriptor & v, const H & g) const;
template<typename H> std::pair< typename graph_traits< H >::adjacency_iterator, typename graph_traits< H >::adjacency_iterator > adjacent_vertices(const typename graph_traits< H >::vertex_descriptor & v, const H & g) const;
template<typename H> graph_traits< H >::vertex_descriptor vertex(typename graph_traits< H >::vertices_size_type i, const H & g) const;
template<typename H> graph_traits< H >::site_descriptor source(const typename graph_traits< H >::bond_descriptor & b, const H & g) const;
template<typename H> graph_traits< H >::site_descriptor target(const typename graph_traits< H >::bond_descriptor & b, const H & g) const;
sites_size_type num_sites() const;
bonds_size_type num_bonds() const;
std::pair< site_iterator, site_iterator > sites() const;
site_descriptor site(sites_size_type i) const;
std::pair< bond_iterator, bond_iterator > bonds() const;
bond_descriptor bond(bonds_size_type i) const;
neighbors_size_type num_neighbors(const site_descriptor & v) const;
std::pair< neighbor_bond_iterator, neighbor_bond_iterator > neighbor_bonds(const site_descriptor & v) const;
std::pair< neighbor_iterator, neighbor_iterator > neighbors(const site_descriptor & v) const;
site_descriptor neighbor(const site_descriptor & v, neighbors_size_type i) const;
template<typename H> graph_traits< H >::sites_size_type num_sites(const H & g) const;
template<typename H> graph_traits< H >::bonds_size_type num_bonds(const H & g) const;
template<typename H> std::pair< typename graph_traits< H >::site_iterator, typename graph_traits< H >::site_iterator > sites(const H & g) const;
template<typename H> graph_traits< H >::site_descriptor site(typename graph_traits< H >::sites_size_type i, const H & g) const;
template<typename H> std::pair< typename graph_traits< H >::bond_iterator, typename graph_traits< H >::bond_iterator > bonds(const H & g) const;
template<typename H> graph_traits< H >::bond_descriptor bond(typename graph_traits< H >::bonds_size_type i, const H & g) const;
template<typename H> graph_traits< H >::neighbors_size_type num_neighbors(const typename graph_traits< H >::site_descriptor & v, const H & g) const;
template<typename H> std::pair< typename graph_traits< H >::neighbor_bond_iterator, typename graph_traits< H >::neighbor_bond_iterator > neighbor_bonds(const typename graph_traits< H >::site_descriptor & v, const H & g) const;
template<typename H> std::pair< typename graph_traits< H >::neighbor_iterator, typename graph_traits< H >::neighbor_iterator > neighbors(const typename graph_traits< H >::site_descriptor & v, const H & g) const;
template<typename H> graph_traits< H >::site_descriptor neighbor(const typename graph_traits< H >::site_descriptor & v, typename graph_traits< H >::neighbors_size_type i, const H & g) const;
double parity(const site_descriptor & v) const;
bool is_bipartite() const;
vertex_type_map_type vertex_type_map() const;
site_type_map_type site_type_map() const;
edge_type_map_type edge_type_map() const;
bond_type_map_type bond_type_map() const;
type_type vertex_type(const vertex_descriptor & v) const;
type_type site_type(const site_descriptor & s) const;
type_type edge_type(const edge_descriptor & e) const;
type_type bond_type(const bond_descriptor & b) const;
bool inhomogeneous() const;
bool inhomogeneous_vertices() const;
bool inhomogeneous_sites() const;
bool inhomogeneous_edges() const;
bool inhomogeneous_bonds() const;
inhomogeneous_vertex_type_map_type inhomogeneous_vertex_type_map() const;
inhomogeneous_site_type_map_type inhomogeneous_site_type_map() const;
inhomogeneous_edge_type_map_type inhomogeneous_edge_type_map() const;
inhomogeneous_bond_type_map_type inhomogeneous_bond_type_map() const;
type_type inhomogeneous_vertex_type(const vertex_descriptor & v) const;
type_type inhomogeneous_site_type(const site_descriptor & s) const;
type_type inhomogeneous_edge_type(const edge_descriptor & e) const;
type_type inhomogeneous_bond_type(const bond_descriptor & b) const;
const vector_type & coordinate(const site_descriptor & s) const;
std::string coordinate_string(const site_descriptor & s, int precision = 0) const;
const vector_type & bond_vector(const bond_descriptor & b) const;
const vector_type & bond_vector_relative(const bond_descriptor & b) const;
std::size_t dimension() const;
std::pair< momentum_iterator, momentum_iterator > momenta() const;
void throw_if_xyz_defined(const Parameters & p, const vertex_descriptor &) const;
void throw_if_xyz_defined(const Parameters & p, const edge_descriptor &) const;
Parameters coordinate_as_parameter(const edge_descriptor & e) const;
Parameters coordinate_as_parameter(const vertex_descriptor & v) const;
size_type volume() const;
const unit_cell_type & unit_cell() const;
cell_descriptor cell(const offset_type & o) const;
std::pair< cell_iterator, cell_iterator > cells() const;
const offset_type & offset(const cell_descriptor & c) const;
bool on_lattice(const offset_type & o) const;
std::pair< bool, boundary_crossing_type > shift(offset_type & o, const offset_type & s) const;
size_type cell_index(const cell_descriptor & c) const;
size_type vertex_index(const vertex_descriptor & v) const;
size_type edge_index(const edge_descriptor & e) const;
size_type index(const cell_descriptor & c) const;
size_type index(const vertex_descriptor & v) const;
size_type index(const edge_descriptor & e) const;
std::pair< basis_vector_iterator, basis_vector_iterator > basis_vectors() const;
std::pair< basis_vector_iterator, basis_vector_iterator > reciprocal_basis_vectors() const;
vector_type origin(const cell_descriptor & c) const;
vector_type coordinate(const cell_descriptor & c, const vector_type & p) const;
vector_type momentum(const vector_type & m) const;
size_type num_distances() const;
std::vector< unsigned int > distance_multiplicities() const;
std::vector< std::string > momenta_labels(int precision = 0) const;
std::vector< std::string > distance_labels(int precision = 0) const;
std::string site_label(site_descriptor const & s, int precision = 0) const;
std::vector< std::string > site_labels(int precision = 0) const;
std::string bond_labels(bond_descriptor const & b, int precision = 0) const;
std::vector< std::string > bond_labels(int precision = 0) const;
size_type distance(vertex_descriptor x, vertex_descriptor y) const;
void calculate_distances() const;
std::vector< std::pair< std::complex< double >, std::vector< std::size_t > > > translations(const vector_type & k) const;
std::vector< int > translation_directions() const;
std::vector< vector_type > translation_momenta() const;
Copyright © 1994, 2002-2005 Matthias Troyer, Synge Todo |