Classes |
struct | arc |
struct | node |
struct | nodeptr |
Public Types |
typedef arc * | arc_id |
typedef int | node_id |
enum | termtype { SOURCE = 0,
SINK = 1
} |
Public Member Functions |
void | add_edge (node_id i, node_id j, captype cap, captype rev_cap) |
node_id | add_node (int num=1) |
void | add_tweights (node_id i, tcaptype cap_source, tcaptype cap_sink) |
void | Copy (Graph< captype, tcaptype, flowtype > *g0) |
void | get_arc_ends (arc_id a, node_id &i, node_id &j) |
int | get_arc_num () |
arc_id | get_first_arc () |
arc_id | get_next_arc (arc_id a) |
int | get_node_num () |
captype | get_rcap (arc *a) |
tcaptype | get_trcap (node_id i) |
| Graph (int node_num_max, int edge_num_max, void(*err_function)(char *)=NULL) |
void | mark_node (node_id i) |
flowtype | maxflow (bool reuse_trees=false, Block< node_id > *changed_list=NULL) |
void | remove_from_changed_list (node_id i) |
void | reset () |
void | set_rcap (arc *a, captype rcap) |
void | set_trcap (node_id i, tcaptype trcap) |
termtype | what_segment (node_id i, termtype default_segm=SOURCE) |
| ~Graph () |
Private Member Functions |
void | add_to_changed_list (node *i) |
void | augment (arc *middle_arc) |
void | maxflow_init () |
void | maxflow_reuse_trees_init () |
node * | next_active () |
void | process_sink_orphan (node *i) |
void | process_source_orphan (node *i) |
void | reallocate_arcs () |
void | reallocate_nodes (int num) |
void | set_active (node *i) |
void | set_orphan_front (node *i) |
void | set_orphan_rear (node *i) |
void | test_consistency (node *current_node=NULL) |
Private Attributes |
arc * | arc_last |
arc * | arc_max |
arc * | arcs |
Block< node_id > * | changed_list |
void(* | error_function )(char *) |
flowtype | flow |
int | maxflow_iteration |
node * | node_last |
node * | node_max |
int | node_num |
DBlock< nodeptr > * | nodeptr_block |
node * | nodes |
nodeptr * | orphan_first |
nodeptr * | orphan_last |
node * | queue_first [2] |
node * | queue_last [2] |
int | TIME |
Static Private Attributes |
static const int | NODEPTR_BLOCK_SIZE = 128 |
template<typename captype, typename tcaptype, typename flowtype>
class Graph< captype, tcaptype, flowtype >
Definition at line 55 of file graph.h.