Edge.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_EDGE_H
#define SH_EDGE_H
#include "SampleValue.h"
#include "Vertex.h"
#include "common.h"
class Edge {
public:
Edge (void)
: Vertex1(NULL), Index1(0), Vertex2(NULL), Index2(0), Weight(UWORD32_MAX) {} ;
Edge (Vertex *v1, unsigned short idx1, Vertex *v2, unsigned short idx2) ;
Edge (const Edge& e) ;
Vertex *getVertex1 (void) const
{ return Vertex1 ; } ;
void setVertex1 (Vertex* v)
{ Vertex1 = v ; } ;
Vertex *getVertex2 (void) const
{ return Vertex2 ; } ;
unsigned short getIndex1 (void) const
{ return Index1 ; } ;
void setIndex1 (unsigned short i)
{ Index1 = i ; } ;
unsigned short getIndex2 (void) const
{ return Index2 ; } ;
UWORD32 getWeight (void) ;
void set (Vertex* v1, unsigned short idx1, Vertex* v2, unsigned short idx2) ;
void set1 (Vertex* v1, unsigned short idx1) ;
void set2 (Vertex* v2, unsigned short idx2) ;
bool operator== (const Edge& e) const ;
bool operator!= (const Edge& e) const ;
void swap (void) ;
bool contains (const Vertex *v) const ;
Vertex *getOtherVertex (const Vertex *v) const ;
SamplePos getSamplePos (Vertex* v) const ;
SampleValue *getOriginalSampleValue (Vertex *v) const ;
SampleValue *getReplacingSampleValue (Vertex *v) const ;
void print (unsigned short spc = 0) const ;
private:
Vertex *Vertex1 ;
unsigned short Index1 ;
Vertex *Vertex2 ;
unsigned short Index2 ;
UWORD32 Weight ;
} ;
#endif // ndef SH_EDGE_H
Edge::Index1
unsigned short Index1
contains the index of the sample (of those in Vertex1) that will be changed (if this edge is used) ...
Definition: Edge.h:111
Edge::set1
void set1(Vertex *v1, unsigned short idx1)
Definition: Edge.cc:58
Edge::Vertex1
Vertex * Vertex1
Definition: Edge.h:109
Edge::getOtherVertex
Vertex * getOtherVertex(const Vertex *v) const
Definition: Edge.cc:106
Edge::getIndex2
unsigned short getIndex2(void) const
Definition: Edge.h:61
Edge::Index2
unsigned short Index2
contains the index of the sample (of those in Vertex2) that will be changed (if this edge is used) ...
Definition: Edge.h:115
Edge::Edge
Edge(void)
Definition: Edge.h:33
SamplePos
UWORD32 SamplePos
Definition: common.h:67
Edge::swap
void swap(void)
Definition: Edge.cc:90
Edge
Definition: Edge.h:28
SampleValue
the value of a sample in a CvrStgFile
Definition: SampleValue.h:61
Edge::setIndex1
void setIndex1(unsigned short i)
Definition: Edge.h:58
Edge::print
void print(unsigned short spc=0) const
Definition: Edge.cc:166
Edge::getVertex2
Vertex * getVertex2(void) const
Definition: Edge.h:52
Edge::getWeight
UWORD32 getWeight(void)
Definition: Edge.cc:41
UWORD32_MAX
#define UWORD32_MAX
Definition: common.h:53
Edge::getIndex1
unsigned short getIndex1(void) const
Definition: Edge.h:55
Edge::setVertex1
void setVertex1(Vertex *v)
Definition: Edge.h:49
Edge::operator!=
bool operator!=(const Edge &e) const
Definition: Edge.cc:85
UWORD32
unsigned long UWORD32
Definition: common.h:45
Edge::Vertex2
Vertex * Vertex2
Definition: Edge.h:113
Edge::operator==
bool operator==(const Edge &e) const
Definition: Edge.cc:72
Edge::getSamplePos
SamplePos getSamplePos(Vertex *v) const
Definition: Edge.cc:121
Vertex.h
Edge::contains
bool contains(const Vertex *v) const
Definition: Edge.cc:101
Edge::getVertex1
Vertex * getVertex1(void) const
Definition: Edge.h:46
common.h
SampleValue.h
Edge::Weight
UWORD32 Weight
Definition: Edge.h:117
Edge::getReplacingSampleValue
SampleValue * getReplacingSampleValue(Vertex *v) const
Definition: Edge.cc:151
Vertex
a vertex in a graph
Definition: Vertex.h:43
Edge::getOriginalSampleValue
SampleValue * getOriginalSampleValue(Vertex *v) const
Definition: Edge.cc:136
Edge::set2
void set2(Vertex *v2, unsigned short idx2)
Definition: Edge.cc:65