Boost  v1.57.0
doxygen for www.boost.org
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
boost::graph::dimacs_basic_reader Class Reference

#include <dimacs.hpp>

Collaboration diagram for boost::graph::dimacs_basic_reader:

Public Types

enum  incr_mode {
  edge,
  edge_weight
}
 
typedef std::size_t vertices_size_type
 
typedef std::size_t edges_size_type
 
typedef double vertex_weight_type
 
typedef double edge_weight_type
 
typedef std::pair
< vertices_size_type,
vertices_size_type
edge_type
 

Public Member Functions

 dimacs_basic_reader (std::istream &in, bool want_weights=true)
 
 dimacs_basic_reader ()
 
edge_type edge_deref ()
 
edge_typeedge_ref ()
 
edge_weight_type edge_weight_deref ()
 
dimacs_basic_reader incr (incr_mode mode)
 
bool done_edges ()
 
bool done_edge_weights ()
 
vertices_size_type n_vertices ()
 
vertices_size_type processed_edges ()
 
vertices_size_type processed_edge_weights ()
 
vertices_size_type n_edges ()
 

Protected Member Functions

bool read_edge_line (char *linebuf, int &from, int &to, int &weight)
 

Protected Attributes

std::queue< edge_typeread_edges
 
std::queue< edge_weight_typeread_edge_weights
 
std::istream & inpt
 
std::string buf
 
vertices_size_type num_vertices
 
vertices_size_type num_edges
 
vertices_size_type seen_edges
 
bool want_weights
 

Member Typedef Documentation

Member Enumeration Documentation

Enumerator
edge 
edge_weight 

Constructor & Destructor Documentation

boost::graph::dimacs_basic_reader::dimacs_basic_reader ( std::istream &  in,
bool  want_weights = true 
)
inline
boost::graph::dimacs_basic_reader::dimacs_basic_reader ( )
inline

Member Function Documentation

bool boost::graph::dimacs_basic_reader::done_edge_weights ( )
inline

References inpt, and read_edge_weights.

bool boost::graph::dimacs_basic_reader::done_edges ( )
inline

References inpt, and read_edges.

edge_type boost::graph::dimacs_basic_reader::edge_deref ( )
inline

References BOOST_ASSERT, and read_edges.

edge_type* boost::graph::dimacs_basic_reader::edge_ref ( )
inline

References BOOST_ASSERT, and read_edges.

edge_weight_type boost::graph::dimacs_basic_reader::edge_weight_deref ( )
inline

References BOOST_ASSERT, and read_edge_weights.

vertices_size_type boost::graph::dimacs_basic_reader::n_edges ( )
inline

References num_edges.

vertices_size_type boost::graph::dimacs_basic_reader::n_vertices ( )
inline

References num_vertices.

vertices_size_type boost::graph::dimacs_basic_reader::processed_edge_weights ( )
inline

References read_edge_weights, and seen_edges.

vertices_size_type boost::graph::dimacs_basic_reader::processed_edges ( )
inline

References read_edges, and seen_edges.

bool boost::graph::dimacs_basic_reader::read_edge_line ( char *  linebuf,
int &  from,
int &  to,
int &  weight 
)
inlineprotected

References want_weights.

Referenced by incr().

Member Data Documentation

std::string boost::graph::dimacs_basic_reader::buf
protected

Referenced by dimacs_basic_reader(), and incr().

std::istream& boost::graph::dimacs_basic_reader::inpt
protected
vertices_size_type boost::graph::dimacs_basic_reader::num_edges
protected

Referenced by dimacs_basic_reader(), incr(), and n_edges().

vertices_size_type boost::graph::dimacs_basic_reader::num_vertices
protected

Referenced by dimacs_basic_reader(), and n_vertices().

std::queue<edge_weight_type> boost::graph::dimacs_basic_reader::read_edge_weights
protected
std::queue<edge_type> boost::graph::dimacs_basic_reader::read_edges
protected
vertices_size_type boost::graph::dimacs_basic_reader::seen_edges
protected
bool boost::graph::dimacs_basic_reader::want_weights
protected

Referenced by incr(), and read_edge_line().


The documentation for this class was generated from the following file: