Jameo Core Library
Loading...
Searching...
No Matches
Public Member Functions | Friends | List of all members
jm::DiffDistance Class Reference

This class calculates the Levenshtein distance between individual entities. More...

Public Member Functions

 DiffDistance ()
 Constructor.
 
 ~DiffDistance ()
 Destructor.
 
void clear ()
 Clears the internal state to prepare for a new calculation.
 
void addU (Object *obj)
 Adds an element to the u vector.
 
void addV (Object *obj)
 Adds an element to the v vector.
 
DiffBacktracesolve ()
 This method calculates the Levenshtein distance between the two vectors.
 
int64 distance () const
 Returns the Levenshtein distance between the two vectors.
 

Friends

class DiffDiag
 

Detailed Description

This class calculates the Levenshtein distance between individual entities.

For the distance calculation, the only decisive factor is whether the two objects are identical or not. The "O(|A|(1+DAB)) Levenshtein distance algorithm with lazy evaluation" is used because calculating a fully populated matrix is much too slow for the classical algorithm for large files.

Constructor & Destructor Documentation

◆ DiffDistance()

jm::DiffDistance::DiffDistance ( )

Constructor.

◆ ~DiffDistance()

jm::DiffDistance::~DiffDistance ( )

Destructor.

Member Function Documentation

◆ addU()

void jm::DiffDistance::addU ( Object obj)

Adds an element to the u vector.

◆ addV()

void jm::DiffDistance::addV ( Object obj)

Adds an element to the v vector.

◆ clear()

void jm::DiffDistance::clear ( )

Clears the internal state to prepare for a new calculation.

This method clears the internal state of the DiffDistance object in order to prepare for a new calculation.

◆ distance()

int64 jm::DiffDistance::distance ( ) const

Returns the Levenshtein distance between the two vectors.

This method calculates the Levenshtein distance between the two vectors of objects. The Levenshtein distance is a measure of the difference between two strings or vectors. If the distance is 0, it means the objects are identical.

Returns
The Levenshtein distance between the two vectors.

◆ solve()

DiffBacktrace * jm::DiffDistance::solve ( )

This method calculates the Levenshtein distance between the two vectors.

Friends And Related Symbol Documentation

◆ DiffDiag

friend class DiffDiag
friend