Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

WKSConstructionHeuristic.h

Go to the documentation of this file.
00001 /* 00002 * steghide 0.5.1 - a steganography program 00003 * Copyright (C) 1999-2003 Stefan Hetzl <shetzl@chello.at> 00004 * 00005 * This program is free software; you can redistribute it and/or 00006 * modify it under the terms of the GNU General Public License 00007 * as published by the Free Software Foundation; either version 2 00008 * of the License, or (at your option) any later version. 00009 * 00010 * This program is distributed in the hope that it will be useful, 00011 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00013 * GNU General Public License for more details. 00014 * 00015 * You should have received a copy of the GNU General Public License 00016 * along with this program; if not, write to the Free Software 00017 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 00018 * 00019 */ 00020 00021 #ifndef SH_WKSCONSTRUCTIONHEURISTIC_H 00022 #define SH_WKSCONSTRUCTIONHEURISTIC_H 00023 00024 #include <functional> 00025 #include <queue> 00026 #include <vector> 00027 00028 class Edge ; 00029 class Graph ; 00030 class Matching ; 00031 #include "MatchingAlgorithm.h" 00032 class ProgressOutput ; 00033 class Vertex ; 00034 #include "common.h" 00035 00048 class WKSConstructionHeuristic : public MatchingAlgorithm { 00049 public: 00054 WKSConstructionHeuristic (Graph* g, Matching* m, float goal = 100.0) ; 00055 00056 virtual ~WKSConstructionHeuristic (void) {} ; 00057 00058 const char* getName (void) const 00059 { return "Weighted Karp&Sipser Construction Heuristic" ; } ; 00060 00061 void run (void) ; 00062 00073 class LongerShortestEdge : public std::binary_function<Vertex*,Vertex*,bool> { 00074 public: 00075 bool operator() (const Vertex *v1, const Vertex *v2) ; 00076 } ; 00077 00078 #ifdef DEBUG 00079 void print (unsigned short spc = 0) ; 00080 void printPQ (std::priority_queue<Vertex*, std::vector<Vertex*>, LongerShortestEdge>& pq) ; 00081 #endif 00082 00083 private: 00087 Vertex *findVertexDeg1 (void) ; 00088 00092 Vertex *findVertexDegG (void) ; 00093 00097 void checkNeighboursDeg1 (Vertex *v) ; 00098 00100 std::priority_queue<Vertex*, std::vector<Vertex*>, LongerShortestEdge> VerticesDeg1 ; 00102 std::priority_queue<Vertex*, std::vector<Vertex*>, LongerShortestEdge> VerticesDegG ; 00103 } ; 00104 00105 #endif // ndef SH_WKSCONSTRUCTIONHEURISTIC_H

Generated on Fri Jul 16 19:41:21 2004 for steghide by doxygen 1.3.7