1 /* 2 * steghide 0.5.1 - a steganography program 3 * Copyright (C) 1999-2003 Stefan Hetzl <shetzl@chello.at> 4 * 5 * This program is free software; you can redistribute it and/or 6 * modify it under the terms of the GNU General Public License 7 * as published by the Free Software Foundation; either version 2 8 * of the License, or (at your option) any later version. 9 * 10 * This program is distributed in the hope that it will be useful, 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 * GNU General Public License for more details. 14 * 15 * You should have received a copy of the GNU General Public License 16 * along with this program; if not, write to the Free Software 17 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 * 19 */ 20 21 #ifndef SH_BFSAPHeuristic 22 #define SH_BFSAPHeuristic 23 24 #include "EdgeIterator.h" 25 #include "MatchingAlgorithm.h" 26 #include "Vertex.h" 27 28 class Edge ; 29 #include "Graph.h" 30 class Matching ; 31 32 /** 33 * \class BFSAPHeuristic 34 * \brief a matching algorithm implementing a heuristic breadth-first-search for augmenting paths 35 **/ 36 class BFSAPHeuristic : public MatchingAlgorithm { 37 public: 38 /** 39 * construct an BFSAPHeuristic object 40 * \param g the graph on which this heuristic should run 41 * \param m the matching to start with 42 **/ 43 BFSAPHeuristic (Graph* g, Matching* m) ; 44 45 virtual ~BFSAPHeuristic (void) ; 46 getName(void)47 const char* getName (void) const 48 { return "BFS Augmenting Path Heuristic" ; } ; 49 50 void run (void) ; 51 52 private: 53 /** 54 * \param v0 an exposed vertex 55 * \param path an array of Edge pointers where the path will be put 56 * \return the length of the path (the number of valid edges in path) 57 **/ 58 unsigned long searchAugmentingPath (Vertex* v0, const Edge** path) ; 59 60 bool* VertexVisited ; 61 Edge* BackEdge ; 62 } ; 63 64 #endif // ndef SH_BFSAPHeuristic 65