adj_list< V_T, E_T, ALLOC > Class Template Reference

core adjacency list class to store the pattern. More...

#include <adj_list.h>

List of all members.

Public Types

typedef V_T VERTEX_T
typedef E_T EDGE_T
typedef vertex_info< VERTEX_T,
EDGE_T, ALLOC > 
VERTEX_INFO
typedef adj_list< V_T, E_T,
ALLOC > 
ADJ_L
typedef VERTEX_LIST< VERTEX_INFOADJ_LIST
typedef ADJ_LIST::iterator IT
typedef ADJ_LIST::const_iterator CONST_IT
typedef VERTEX_INFO::EIT EIT
typedef VERTEX_INFO::CONST_EIT CONST_EIT
typedef std::pair< EIT, EIT > EIT_PAIR
typedef std::pair< CONST_EIT,
CONST_EIT > 
CONST_EIT_PAIR

Public Member Functions

void * operator new (size_t size)
void operator delete (void *p, size_t size)
IT begin ()
CONST_IT begin () const
IT end ()
CONST_IT end () const
int size () const
void clear ()
void push_back (const VERTEX_INFO &vi)
IT vertex_vals (const int &)
CONST_IT vertex_vals (const int &idval) const
std::pair< EIT, EIT > out_edges (const int &idval)
std::pair< CONST_EIT, CONST_EIT > out_edges (const int &idval) const
std::pair< EIT, EIT > in_edges (const int &idval)
std::pair< CONST_EIT, CONST_EIT > in_edges (const int &idval) const
int out_nbr_size (const int &vid) const
int in_nbr_size (const int &vid) const
int add_vertex (const VERTEX_T &v)
void add_out_edge (const int &src, const int &dest, const EDGE_T &e)
void add_in_edge (const int &dest, const int &src, const EDGE_T &e)
bool get_out_edge (const int &src, const int &dest, EDGE_T &e) const
bool get_in_edge (const int &src, const int &dest, EDGE_T &e) const

Friends

ostream & operator<< (ostream &, const adj_list< V_T, E_T, ALLOC > &)

Classes

class  VERTEX_LIST


Detailed Description

template<typename V_T, typename E_T, template< typename > class ALLOC = std::allocator>
class adj_list< V_T, E_T, ALLOC >

core adjacency list class to store the pattern.

the template arguments are vertex_type and edge_type.


Member Function Documentation

template<typename V_T, typename E_T, template< typename > class ALLOC = std::allocator>
void adj_list< V_T, E_T, ALLOC >::add_in_edge ( const int &  dest,
const int &  src,
const EDGE_T &  e 
) [inline]

Adds in-edge FROM src TO dest

template<typename V_T, typename E_T, template< typename > class ALLOC = std::allocator>
void adj_list< V_T, E_T, ALLOC >::add_out_edge ( const int &  src,
const int &  dest,
const EDGE_T &  e 
) [inline]

Adds edge FROM src TO dest

template<typename V_T, typename E_T, template< typename > class ALLOC = std::allocator>
int adj_list< V_T, E_T, ALLOC >::add_vertex ( const VERTEX_T &  v  )  [inline]

Adds given vertex object and returns its id As is evident, these ids are generated in increasing order

template<typename V_T, typename E_T, template< typename > class ALLOC = std::allocator>
bool adj_list< V_T, E_T, ALLOC >::get_in_edge ( const int &  src,
const int &  dest,
EDGE_T &  e 
) const [inline]

Returns true if there is an in-edge b/w specified vertices, populates e with edge label

template<typename V_T, typename E_T, template< typename > class ALLOC = std::allocator>
bool adj_list< V_T, E_T, ALLOC >::get_out_edge ( const int &  src,
const int &  dest,
EDGE_T &  e 
) const [inline]

Returns true if there is an out-edge b/w specified vertices, populates e with edge label

template<typename V_T, typename E_T, template< typename > class ALLOC = std::allocator>
std::pair<EIT, EIT> adj_list< V_T, E_T, ALLOC >::in_edges ( const int &  idval  )  [inline]

Returns a pair of iterators, the first of the pair points to the first entity in the set of in-edges of idval, the second to the end of edges

template<typename V_T, typename E_T, template< typename > class ALLOC = std::allocator>
int adj_list< V_T, E_T, ALLOC >::in_nbr_size ( const int &  vid  )  const [inline]

Returns size of in-neighbors of vid

template<typename V_T, typename E_T, template< typename > class ALLOC = std::allocator>
std::pair<EIT, EIT> adj_list< V_T, E_T, ALLOC >::out_edges ( const int &  idval  )  [inline]

Returns a pair of iterators, the first of the pair points to the first entity in the set of out-edges of idval, the second to the end of edges

template<typename V_T, typename E_T, template< typename > class ALLOC = std::allocator>
int adj_list< V_T, E_T, ALLOC >::out_nbr_size ( const int &  vid  )  const [inline]

Returns size of out-neighbors of vid

template<typename V_T, typename E_T, template< typename > class ALLOC = std::allocator>
int adj_list< V_T, E_T, ALLOC >::size (  )  const [inline]

Returns number of vertices

template<typename V_T, typename E_T, template< typename > class ALLOC>
adj_list< V_T, E_T, ALLOC >::IT adj_list< V_T, E_T, ALLOC >::vertex_vals ( const int &   ) 

Returns the info associated with this vertex id


The documentation for this class was generated from the following file:
Generated on Wed Jul 26 14:01:08 2006 for DMTL by  doxygen 1.4.7