dtl::Diff< elem, sequence > Class Template Reference

#include <dtl.hpp>

List of all members.

Public Member Functions

 Diff (sequence &a, sequence &b)
 ~Diff ()
int getEditDistance () const
Lcs< elem > getLcs () const
Ses< elem > getSes () const
uniHunkVec getUniHunks () const
bool isReverse () const
bool isHuge () const
void onHuge ()
void offHuge ()
bool isUnserious () const
void onUnserious ()
void offUnserious ()
void onOnlyEditDistance ()
sequence uniPatch (sequence seq)
sequence patch (sequence seq) const
void compose ()
void printUnifiedFormat ()
void composeUnifiedHunks ()

Private Types

typedef std::pair< elem, elemInfosesElem
typedef std::vector< sesElemsesElemVec
typedef std::vector< uniHunk
< sesElem > > 
uniHunkVec
typedef std::list< elem > elemList

Private Member Functions

void init ()
int snake (int k, int above, int below)
bool recordSequence (editPathCordinates &v)
void recordOddSequence (int idx, int length, typename sequence::const_iterator it, const editType et)
void joinSesVec (sesElemVec &s1, sesElemVec &s2) const

Private Attributes

sequence A
sequence B
int M
int N
int delta
int offset
int * fp
int editDistance
Lcs< elem > lcs
Ses< elem > ses
editPath path
editPathCordinates pathCordinates
bool reverse
bool huge
bool unserious
bool onlyEditDistance
uniHunkVec uniHunks


Detailed Description

template<typename elem, typename sequence>
class dtl::Diff< elem, sequence >

diff template class sequence must support random_access_iterator.

Definition at line 257 of file dtl.hpp.


Member Typedef Documentation

template<typename elem , typename sequence >
typedef std::list< elem > dtl::Diff< elem, sequence >::elemList [private]

Definition at line 262 of file dtl.hpp.

template<typename elem , typename sequence >
typedef std::pair<elem, elemInfo> dtl::Diff< elem, sequence >::sesElem [private]

Definition at line 259 of file dtl.hpp.

template<typename elem , typename sequence >
typedef std::vector< sesElem > dtl::Diff< elem, sequence >::sesElemVec [private]

Definition at line 260 of file dtl.hpp.

template<typename elem , typename sequence >
typedef std::vector< uniHunk< sesElem > > dtl::Diff< elem, sequence >::uniHunkVec [private]

Definition at line 261 of file dtl.hpp.


Constructor & Destructor Documentation

template<typename elem , typename sequence >
dtl::Diff< elem, sequence >::Diff ( sequence &  a,
sequence &  b 
) [inline]

Definition at line 282 of file dtl.hpp.

template<typename elem , typename sequence >
dtl::Diff< elem, sequence >::~Diff (  )  [inline]

Definition at line 286 of file dtl.hpp.


Member Function Documentation

template<typename elem , typename sequence >
void dtl::Diff< elem, sequence >::compose (  )  [inline]

compose Longest Common Subsequence and Shortest Edit Script. The algorithm implemented here is based on "An O(NP) Sequence Comparison Algorithm" by described by Sun Wu, Udi Manber and Gene Myers

Definition at line 425 of file dtl.hpp.

template<typename elem , typename sequence >
void dtl::Diff< elem, sequence >::composeUnifiedHunks (  )  [inline]

compose Unified Format Hunks from Shortest Edit Script

Definition at line 483 of file dtl.hpp.

template<typename elem , typename sequence >
int dtl::Diff< elem, sequence >::getEditDistance (  )  const [inline]

Definition at line 288 of file dtl.hpp.

template<typename elem , typename sequence >
Lcs<elem> dtl::Diff< elem, sequence >::getLcs (  )  const [inline]

Definition at line 292 of file dtl.hpp.

template<typename elem , typename sequence >
Ses<elem> dtl::Diff< elem, sequence >::getSes (  )  const [inline]

Definition at line 296 of file dtl.hpp.

template<typename elem , typename sequence >
uniHunkVec dtl::Diff< elem, sequence >::getUniHunks (  )  const [inline]

Definition at line 300 of file dtl.hpp.

template<typename elem , typename sequence >
void dtl::Diff< elem, sequence >::init (  )  [inline, private]

Definition at line 610 of file dtl.hpp.

template<typename elem , typename sequence >
bool dtl::Diff< elem, sequence >::isHuge (  )  const [inline]

Definition at line 308 of file dtl.hpp.

template<typename elem , typename sequence >
bool dtl::Diff< elem, sequence >::isReverse (  )  const [inline]

Definition at line 304 of file dtl.hpp.

template<typename elem , typename sequence >
bool dtl::Diff< elem, sequence >::isUnserious (  )  const [inline]

Definition at line 320 of file dtl.hpp.

template<typename elem , typename sequence >
void dtl::Diff< elem, sequence >::joinSesVec ( sesElemVec s1,
sesElemVec s2 
) const [inline, private]

Definition at line 739 of file dtl.hpp.

template<typename elem , typename sequence >
void dtl::Diff< elem, sequence >::offHuge (  )  [inline]

Definition at line 316 of file dtl.hpp.

template<typename elem , typename sequence >
void dtl::Diff< elem, sequence >::offUnserious (  )  [inline]

Definition at line 328 of file dtl.hpp.

template<typename elem , typename sequence >
void dtl::Diff< elem, sequence >::onHuge (  )  [inline]

Definition at line 312 of file dtl.hpp.

template<typename elem , typename sequence >
void dtl::Diff< elem, sequence >::onOnlyEditDistance (  )  [inline]

Definition at line 332 of file dtl.hpp.

template<typename elem , typename sequence >
void dtl::Diff< elem, sequence >::onUnserious (  )  [inline]

Definition at line 324 of file dtl.hpp.

template<typename elem , typename sequence >
sequence dtl::Diff< elem, sequence >::patch ( sequence  seq  )  const [inline]

patching with Shortest Edit Script

Definition at line 395 of file dtl.hpp.

template<typename elem , typename sequence >
void dtl::Diff< elem, sequence >::printUnifiedFormat (  )  [inline]

print difference between A and B with the format such as Unified Format.

Definition at line 476 of file dtl.hpp.

template<typename elem , typename sequence >
void dtl::Diff< elem, sequence >::recordOddSequence ( int  idx,
int  length,
typename sequence::const_iterator  it,
const editType  et 
) [inline, private]

Definition at line 728 of file dtl.hpp.

template<typename elem , typename sequence >
bool dtl::Diff< elem, sequence >::recordSequence ( editPathCordinates v  )  [inline, private]

Definition at line 652 of file dtl.hpp.

template<typename elem , typename sequence >
int dtl::Diff< elem, sequence >::snake ( int  k,
int  above,
int  below 
) [inline, private]

Definition at line 629 of file dtl.hpp.

template<typename elem , typename sequence >
sequence dtl::Diff< elem, sequence >::uniPatch ( sequence  seq  )  [inline]

patching with Unified Format Hunks

Definition at line 339 of file dtl.hpp.


Member Data Documentation

template<typename elem , typename sequence >
sequence dtl::Diff< elem, sequence >::A [private]

Definition at line 264 of file dtl.hpp.

template<typename elem , typename sequence >
sequence dtl::Diff< elem, sequence >::B [private]

Definition at line 265 of file dtl.hpp.

template<typename elem , typename sequence >
int dtl::Diff< elem, sequence >::delta [private]

Definition at line 268 of file dtl.hpp.

template<typename elem , typename sequence >
int dtl::Diff< elem, sequence >::editDistance [private]

Definition at line 271 of file dtl.hpp.

template<typename elem , typename sequence >
int* dtl::Diff< elem, sequence >::fp [private]

Definition at line 270 of file dtl.hpp.

template<typename elem , typename sequence >
bool dtl::Diff< elem, sequence >::huge [private]

Definition at line 277 of file dtl.hpp.

template<typename elem , typename sequence >
Lcs<elem> dtl::Diff< elem, sequence >::lcs [private]

Definition at line 272 of file dtl.hpp.

template<typename elem , typename sequence >
int dtl::Diff< elem, sequence >::M [private]

Definition at line 266 of file dtl.hpp.

template<typename elem , typename sequence >
int dtl::Diff< elem, sequence >::N [private]

Definition at line 267 of file dtl.hpp.

template<typename elem , typename sequence >
int dtl::Diff< elem, sequence >::offset [private]

Definition at line 269 of file dtl.hpp.

template<typename elem , typename sequence >
bool dtl::Diff< elem, sequence >::onlyEditDistance [private]

Definition at line 279 of file dtl.hpp.

template<typename elem , typename sequence >
editPath dtl::Diff< elem, sequence >::path [private]

Definition at line 274 of file dtl.hpp.

template<typename elem , typename sequence >
editPathCordinates dtl::Diff< elem, sequence >::pathCordinates [private]

Definition at line 275 of file dtl.hpp.

template<typename elem , typename sequence >
bool dtl::Diff< elem, sequence >::reverse [private]

Definition at line 276 of file dtl.hpp.

template<typename elem , typename sequence >
Ses<elem> dtl::Diff< elem, sequence >::ses [private]

Definition at line 273 of file dtl.hpp.

template<typename elem , typename sequence >
uniHunkVec dtl::Diff< elem, sequence >::uniHunks [private]

Definition at line 280 of file dtl.hpp.

template<typename elem , typename sequence >
bool dtl::Diff< elem, sequence >::unserious [private]

Definition at line 278 of file dtl.hpp.


The documentation for this class was generated from the following file:


 
©2009 Positive Technologies
 
Generated on Tue Jul 14 18:27:32 2009 for WebEngine by 
 
 
1.5.7
 
Get wpcObj at SourceForge.net. Fast, secure and Free Open Source software downloads