ReadFramework
Graph< captype, tcaptype, flowtype > Class Template Reference

#include <graph.h>

Inheritance diagram for Graph< captype, tcaptype, flowtype >:

Public Types

enum  termtype { SOURCE = 0, SINK = 1 }
 
typedef int node_id
 
typedef arc * arc_id
 

Public Member Functions

 Graph (int node_num_max, int edge_num_max, void(*err_function)(const char *)=NULL)
 
 ~Graph ()
 
node_id add_node (int num=1)
 
void add_edge (node_id i, node_id j, captype cap, captype rev_cap)
 
void add_tweights (node_id i, tcaptype cap_source, tcaptype cap_sink)
 
flowtype maxflow (bool reuse_trees=false, Block< node_id > *changed_list=NULL)
 
termtype what_segment (node_id i, termtype default_segm=SOURCE)
 
void reset ()
 
arc_id get_first_arc ()
 
arc_id get_next_arc (arc_id a)
 
int get_node_num ()
 
int get_arc_num ()
 
void get_arc_ends (arc_id a, node_id &i, node_id &j)
 
tcaptype get_trcap (node_id i)
 
captype get_rcap (arc *a)
 
void set_trcap (node_id i, tcaptype trcap)
 
void set_rcap (arc *a, captype rcap)
 
void mark_node (node_id i)
 
void remove_from_changed_list (node_id i)
 
void Copy (Graph< captype, tcaptype, flowtype > *g0)
 

Member Typedef Documentation

template<typename captype, typename tcaptype, typename flowtype>
typedef arc* Graph< captype, tcaptype, flowtype >::arc_id
template<typename captype, typename tcaptype, typename flowtype>
typedef int Graph< captype, tcaptype, flowtype >::node_id

Member Enumeration Documentation

template<typename captype, typename tcaptype, typename flowtype>
enum Graph::termtype
Enumerator
SOURCE 
SINK 

Constructor & Destructor Documentation

template<typename captype , typename tcaptype , typename flowtype >
Graph< captype, tcaptype, flowtype >::Graph ( int  node_num_max,
int  edge_num_max,
void(*)(const char *)  err_function = NULL 
)
template<typename captype , typename tcaptype , typename flowtype >
Graph< captype, tcaptype, flowtype >::~Graph ( )

Member Function Documentation

template<typename captype , typename tcaptype , typename flowtype >
void Graph< captype, tcaptype, flowtype >::add_edge ( node_id  i,
node_id  j,
captype  cap,
captype  rev_cap 
)
inline

Here is the caller graph for this function:

template<typename captype , typename tcaptype , typename flowtype >
Graph< captype, tcaptype, flowtype >::node_id Graph< captype, tcaptype, flowtype >::add_node ( int  num = 1)
inline

Here is the caller graph for this function:

template<typename captype , typename tcaptype , typename flowtype >
void Graph< captype, tcaptype, flowtype >::add_tweights ( node_id  i,
tcaptype  cap_source,
tcaptype  cap_sink 
)
inline

Here is the caller graph for this function:

template<typename captype , typename tcaptype , typename flowtype >
void Graph< captype, tcaptype, flowtype >::Copy ( Graph< captype, tcaptype, flowtype > *  g0)

Here is the caller graph for this function:

template<typename captype, typename tcaptype, typename flowtype>
void Graph< captype, tcaptype, flowtype >::get_arc_ends ( arc_id  a,
node_id i,
node_id j 
)
inline

Here is the caller graph for this function:

template<typename captype, typename tcaptype, typename flowtype>
int Graph< captype, tcaptype, flowtype >::get_arc_num ( )
inline
template<typename captype , typename tcaptype , typename flowtype >
Graph< captype, tcaptype, flowtype >::arc * Graph< captype, tcaptype, flowtype >::get_first_arc ( )
inline
template<typename captype, typename tcaptype, typename flowtype>
Graph< captype, tcaptype, flowtype >::arc * Graph< captype, tcaptype, flowtype >::get_next_arc ( arc_id  a)
inline
template<typename captype, typename tcaptype, typename flowtype>
int Graph< captype, tcaptype, flowtype >::get_node_num ( )
inline
template<typename captype , typename tcaptype , typename flowtype >
captype Graph< captype, tcaptype, flowtype >::get_rcap ( arc *  a)
inline

Here is the caller graph for this function:

template<typename captype , typename tcaptype , typename flowtype >
tcaptype Graph< captype, tcaptype, flowtype >::get_trcap ( node_id  i)
inline

Here is the caller graph for this function:

template<typename captype , typename tcaptype , typename flowtype >
void Graph< captype, tcaptype, flowtype >::mark_node ( node_id  i)
inline

Here is the caller graph for this function:

template<typename captype , typename tcaptype , typename flowtype >
flowtype Graph< captype, tcaptype, flowtype >::maxflow ( bool  reuse_trees = false,
Block< node_id > *  changed_list = NULL 
)

Here is the caller graph for this function:

template<typename captype, typename tcaptype, typename flowtype>
void Graph< captype, tcaptype, flowtype >::remove_from_changed_list ( node_id  i)
inline
template<typename captype , typename tcaptype , typename flowtype >
void Graph< captype, tcaptype, flowtype >::reset ( )
template<typename captype , typename tcaptype , typename flowtype >
void Graph< captype, tcaptype, flowtype >::set_rcap ( arc *  a,
captype  rcap 
)
inline

Here is the caller graph for this function:

template<typename captype , typename tcaptype , typename flowtype >
void Graph< captype, tcaptype, flowtype >::set_trcap ( node_id  i,
tcaptype  trcap 
)
inline

Here is the caller graph for this function:

template<typename captype , typename tcaptype , typename flowtype >
Graph< captype, tcaptype, flowtype >::termtype Graph< captype, tcaptype, flowtype >::what_segment ( node_id  i,
termtype  default_segm = SOURCE 
)
inline

Here is the caller graph for this function:


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