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

SSD::DiffDijkstra Class Reference

Dijkstra search core object. More...

#include <diff.h>

Inherits SSD::Diff.

Inheritance diagram for SSD::DiffDijkstra:

Inheritance graph
[legend]
Collaboration diagram for SSD::DiffDijkstra:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 DiffDijkstra (Doc &eins, Doc &zwei)
 constructor for the search
 ~DiffDijkstra ()
 destructor, also destroying the result unless unset
bool run ()
 execute the search

Static Public Member Functions

static void setSearchTreeOutput (char *filename)
 for trace output

Public Attributes

DiffDijkstraStateresult
 set to the result state object when finished

Static Public Attributes

static bool fastApproximativeMode = false
 if fast-mode should be used

Private Member Functions

bool step ()
 try to make one more step
DiffDijkstraStatemakeState (const DiffDijkstraState *state, NodeVec::const_iterator n1, Node *n2)
 generate a new state object

Private Attributes

int seq
 sequence counting
int steps
 number of steps done (i.e. nodes expanded) in the search
multiset< DiffDijkstraState *,
DiffDijkstraStateQueue
worklist
 working queue
NodeVec nodevec
 list of nodes from first document to be processed - will be resorted to optimize

Static Private Attributes

static std::ofstream * searchTreeOutputStream = NULL
 debugging output stream

Detailed Description

Dijkstra search core object.

this object will control an Dijkstra search, managing the priority queue etc.

Definition at line 164 of file diff.h.


Constructor & Destructor Documentation

SSD::DiffDijkstra::DiffDijkstra Doc eins,
Doc zwei
 

constructor for the search

Parameters:
eins first document to be compared
zwei second document to be compared

Definition at line 24 of file diff.cc.

SSD::DiffDijkstra::~DiffDijkstra  ) 
 

destructor, also destroying the result unless unset

Definition at line 32 of file diff.cc.

References result.


Member Function Documentation

DiffDijkstraState * SSD::DiffDijkstra::makeState const DiffDijkstraState state,
NodeVec::const_iterator  n1,
Node n2
[private]
 

generate a new state object

Parameters:
state the previous (parent) state object
n1 the node in the first document newly matched
n2 the node in the second document newly matched

Definition at line 130 of file diff.cc.

References SSD::DiffDijkstraState::ass, SSD::DiffDijkstraState::cost, SSD::DiffDijkstraState::credit, SSD::DiffDijkstraState::credits_used, SSD::DiffDijkstraState::length, SSD::RelCount::modify(), SSD::process_relations(), searchTreeOutputStream, seq, and SSD::DiffDijkstraState::seq.

Referenced by step().

Here is the call graph for this function:

bool SSD::DiffDijkstra::run  )  [virtual]
 

execute the search

Returns:
true if not yet finished

Reimplemented from SSD::Diff.

Definition at line 237 of file diff.cc.

References SSD::Diff::doc1, SSD::Diff::doc2, fastApproximativeMode, SSD::Doc::getNodesIter(), SSD::Doc::getNodesIterEnd(), SSD::Doc::index_by_label, nodevec, SSD::Doc::relcount, step(), and worklist.

Here is the call graph for this function:

void SSD::DiffDijkstra::setSearchTreeOutput char *  filename  )  [static]
 

for trace output

Definition at line 294 of file diff.cc.

References searchTreeOutputStream.

bool SSD::DiffDijkstra::step  )  [private]
 

try to make one more step

Returns:
if successful or finished

Definition at line 199 of file diff.cc.

References SSD::DiffDijkstraState::ass, SSD::DiffDijkstraState::cost, SSD::Diff::doc2, SSD::DiffDijkstraState::findNodeAssignment2(), SSD::Doc::index_by_label, SSD::DiffDijkstraState::iter, SSD::DiffDijkstraState::length, makeState(), SSD::NodeAssignments::n1, SSD::NodeAssignments::n2, nodevec, result, searchTreeOutputStream, seq, SSD::DiffDijkstraState::seq, steps, and worklist.

Referenced by run().

Here is the call graph for this function:


Member Data Documentation

bool SSD::DiffDijkstra::fastApproximativeMode = false [static]
 

if fast-mode should be used

Definition at line 21 of file diff.cc.

Referenced by run().

NodeVec SSD::DiffDijkstra::nodevec [private]
 

list of nodes from first document to be processed - will be resorted to optimize

Definition at line 184 of file diff.h.

Referenced by run(), and step().

DiffDijkstraState* SSD::DiffDijkstra::result
 

set to the result state object when finished

Definition at line 194 of file diff.h.

Referenced by SSD::XUpdateWriter::run(), SSD::MergedWriter::run(), SSD::MarkedWriter::run(), step(), and ~DiffDijkstra().

std::ofstream * SSD::DiffDijkstra::searchTreeOutputStream = NULL [static, private]
 

debugging output stream

Definition at line 304 of file diff.cc.

Referenced by makeState(), setSearchTreeOutput(), and step().

int SSD::DiffDijkstra::seq [private]
 

sequence counting

Definition at line 168 of file diff.h.

Referenced by makeState(), and step().

int SSD::DiffDijkstra::steps [private]
 

number of steps done (i.e. nodes expanded) in the search

Definition at line 171 of file diff.h.

Referenced by step().

multiset<DiffDijkstraState*, DiffDijkstraStateQueue > SSD::DiffDijkstra::worklist [private]
 

working queue

Definition at line 173 of file diff.h.

Referenced by run(), and step().


The documentation for this class was generated from the following files:
Generated on Thu Aug 4 17:58:51 2005 for SSDDiff by  doxygen 1.4.3-20050530