DFSAPHeuristic.h
Go to the documentation of this file.
/*
* steghide 0.5.1 - a steganography program
* Copyright (C) 1999-2003 Stefan Hetzl <shetzl@chello.at>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
*/
#ifndef SH_DFSAPHEURISTIC
#define SH_DFSAPHEURISTIC
#include "EdgeIterator.h"
#include "MatchingAlgorithm.h"
#include "Vertex.h"
class Edge ;
#include "Graph.h"
class Matching ;
class DFSAPHeuristic : public MatchingAlgorithm {
public:
DFSAPHeuristic (Graph* g, Matching* m, float goal = 100.0, UWORD32 mne = UWORD32_MAX, EdgeIterator::ITERATIONMODE mo = EdgeIterator::SAMPLEOCCURENCE) ;
virtual ~DFSAPHeuristic (void) ;
const char* getName (void) const
{ return "DFS Augmenting Path Heuristic" ; } ;
void reset (UWORD32 mne = UWORD32_MAX, EdgeIterator::ITERATIONMODE mo = EdgeIterator::SAMPLEOCCURENCE) ;
void run (void) ;
private:
unsigned long searchAugmentingPath (Vertex* v0, const Edge** path) ;
const Edge* getNextEdge (Vertex *v) ;
void markVisited (Vertex *v)
{ TimeCounters[v->getLabel()] = TimeCounter ; } ;
bool isVisited (Vertex *v) const
{ return isVisited(v->getLabel()) ; } ;
bool isVisited (VertexLabel vlbl) const
{ return (TimeCounters[vlbl] == TimeCounter) ; } ;
UWORD32 TimeCounter ;
UWORD32* TimeCounters ;
bool* VertexOnPath ;
EdgeIterator* EdgeIterators ;
#ifdef DEBUG
unsigned long long NEdgesSuccessful ;
unsigned long long NEdgesUnsuccessful ;
unsigned long NSuccessful ;
unsigned long NUnsuccessful ;
std::string SuccessString ;
#endif
} ;
#endif // ndef SH_DFSAPHEURISTIC
EdgeIterator::ITERATIONMODE
ITERATIONMODE
Definition: EdgeIterator.h:53
MatchingAlgorithm.h
EdgeIterator::SAMPLEOCCURENCE
Definition: EdgeIterator.h:54
DFSAPHeuristic::getName
const char * getName(void) const
Definition: DFSAPHeuristic.h:54
DFSAPHeuristic::isVisited
bool isVisited(Vertex *v) const
Definition: DFSAPHeuristic.h:82
Graph
a graph constructed from a cover file and a message to be embedded
Definition: Graph.h:51
DFSAPHeuristic::reset
void reset(UWORD32 mne=UWORD32_MAX, EdgeIterator::ITERATIONMODE mo=EdgeIterator::SAMPLEOCCURENCE)
Definition: DFSAPHeuristic.cc:61
DFSAPHeuristic::searchAugmentingPath
unsigned long searchAugmentingPath(Vertex *v0, const Edge **path)
Definition: DFSAPHeuristic.cc:125
Edge
Definition: Edge.h:28
DFSAPHeuristic::isVisited
bool isVisited(VertexLabel vlbl) const
Definition: DFSAPHeuristic.h:85
DFSAPHeuristic::DFSAPHeuristic
DFSAPHeuristic(Graph *g, Matching *m, float goal=100.0, UWORD32 mne=UWORD32_MAX, EdgeIterator::ITERATIONMODE mo=EdgeIterator::SAMPLEOCCURENCE)
Definition: DFSAPHeuristic.cc:28
UWORD32_MAX
#define UWORD32_MAX
Definition: common.h:53
VertexLabel
UWORD32 VertexLabel
Definition: common.h:68
EdgeIterator.h
DFSAPHeuristic::VertexOnPath
bool * VertexOnPath
Definition: DFSAPHeuristic.h:90
UWORD32
unsigned long UWORD32
Definition: common.h:45
Matching
represent a matching on a graph
Definition: Matching.h:41
Vertex.h
DFSAPHeuristic::EdgeIterators
EdgeIterator * EdgeIterators
Definition: DFSAPHeuristic.h:91
DFSAPHeuristic::TimeCounters
UWORD32 * TimeCounters
Definition: DFSAPHeuristic.h:89
EdgeIterator
allows an iteration trough all edges of a vertex
Definition: EdgeIterator.h:51
DFSAPHeuristic::~DFSAPHeuristic
virtual ~DFSAPHeuristic(void)
Definition: DFSAPHeuristic.cc:54
DFSAPHeuristic
a matching algorithm implementing a heuristic search for augmenting paths
Definition: DFSAPHeuristic.h:40
Graph.h
DFSAPHeuristic::markVisited
void markVisited(Vertex *v)
Definition: DFSAPHeuristic.h:75
DFSAPHeuristic::run
void run(void)
Definition: DFSAPHeuristic.cc:73
DFSAPHeuristic::TimeCounter
UWORD32 TimeCounter
Definition: DFSAPHeuristic.h:86
Vertex::getLabel
VertexLabel getLabel(void) const
Definition: Vertex.h:98
MatchingAlgorithm
Definition: MatchingAlgorithm.h:27
DFSAPHeuristic::getNextEdge
const Edge * getNextEdge(Vertex *v)
Definition: DFSAPHeuristic.cc:221
Vertex
a vertex in a graph
Definition: Vertex.h:43