Grafalgo
Library of useful data structures and algorithms
|
00001 // AltPath(G,M) class encapsulates data and methods use for alternating 00002 // path algorithm for max size matching. Use constructor to invoke algorithm 00003 00004 #ifndef ALTPATH_H 00005 #define ALTPATH_H 00006 00007 #include "stdinc.h" 00008 #include "Graph.h" 00009 #include "List.h" 00010 #include "Dlist.h" 00011 00012 using namespace grafalgo; 00013 00014 class altPath { 00015 public: 00016 altPath(Graph&,Dlist&,int&); 00017 private: 00018 Graph* graf; // graph we're finding matching for 00019 Dlist* match; // matching we're building 00020 edge* pEdge; // pEdge[u] is edge to parent of u in forest 00021 00022 void augment(edge); // augment the matching 00023 edge findPath(); // find an altmenting path 00024 }; 00025 00026 #endif