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.h
Graph.h
MatchingAlgorithm.h
Vertex.h
DFSAPHeuristic::searchAugmentingPath
unsigned long searchAugmentingPath(Vertex *v0, const Edge **path)
Definition DFSAPHeuristic.cc:125
DFSAPHeuristic::VertexOnPath
bool * VertexOnPath
Definition DFSAPHeuristic.h:90
DFSAPHeuristic::getName
const char * getName(void) const
Definition DFSAPHeuristic.h:54
DFSAPHeuristic::TimeCounter
UWORD32 TimeCounter
Definition DFSAPHeuristic.h:88
DFSAPHeuristic::isVisited
bool isVisited(VertexLabel vlbl) const
Definition DFSAPHeuristic.h:85
DFSAPHeuristic::run
void run(void)
Definition DFSAPHeuristic.cc:73
DFSAPHeuristic::markVisited
void markVisited(Vertex *v)
Definition DFSAPHeuristic.h:75
DFSAPHeuristic::getNextEdge
const Edge * getNextEdge(Vertex *v)
Definition DFSAPHeuristic.cc:221
DFSAPHeuristic::~DFSAPHeuristic
virtual ~DFSAPHeuristic(void)
Definition DFSAPHeuristic.cc:54
DFSAPHeuristic::EdgeIterators
EdgeIterator * EdgeIterators
Definition DFSAPHeuristic.h:91
DFSAPHeuristic::reset
void reset(UWORD32 mne=UWORD32_MAX, EdgeIterator::ITERATIONMODE mo=EdgeIterator::SAMPLEOCCURENCE)
Definition DFSAPHeuristic.cc:61
DFSAPHeuristic::DFSAPHeuristic
DFSAPHeuristic(Graph *g, Matching *m, float goal=100.0, UWORD32 mne=UWORD32_MAX, EdgeIterator::ITERATIONMODE mo=EdgeIterator::SAMPLEOCCURENCE)
Definition DFSAPHeuristic.cc:28
DFSAPHeuristic::isVisited
bool isVisited(Vertex *v) const
Definition DFSAPHeuristic.h:82
DFSAPHeuristic::TimeCounters
UWORD32 * TimeCounters
Definition DFSAPHeuristic.h:89
EdgeIterator
allows an iteration trough all edges of a vertex
Definition EdgeIterator.h:51
EdgeIterator::ITERATIONMODE
ITERATIONMODE
Definition EdgeIterator.h:53
EdgeIterator::SAMPLEOCCURENCE
@ SAMPLEOCCURENCE
Definition EdgeIterator.h:54
Edge
Definition Edge.h:28
Graph
a graph constructed from a cover file and a message to be embedded
Definition Graph.h:51
MatchingAlgorithm::MatchingAlgorithm
MatchingAlgorithm(Graph *g, Matching *m, float goal)
Definition MatchingAlgorithm.cc:24
Matching
represent a matching on a graph
Definition Matching.h:41
Vertex
a vertex in a graph
Definition Vertex.h:43
Vertex::getLabel
VertexLabel getLabel(void) const
Definition Vertex.h:98
UWORD32
unsigned long UWORD32
Definition common.h:45
UWORD32_MAX
#define UWORD32_MAX
Definition common.h:53
VertexLabel
UWORD32 VertexLabel
Definition common.h:68