|
Jameo Core Library
|
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. | |
| DiffBacktrace * | solve () |
| This method calculates the Levenshtein distance between the two vectors. | |
| int64 | distance () const |
| Returns the Levenshtein distance between the two vectors. | |
Friends | |
| class | DiffDiag |
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.
| jm::DiffDistance::DiffDistance | ( | ) |
Constructor.
| jm::DiffDistance::~DiffDistance | ( | ) |
Destructor.
| void jm::DiffDistance::addU | ( | Object * | obj | ) |
Adds an element to the u vector.
| void jm::DiffDistance::addV | ( | Object * | obj | ) |
Adds an element to the v vector.
| 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.
| 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.
| DiffBacktrace * jm::DiffDistance::solve | ( | ) |
This method calculates the Levenshtein distance between the two vectors.
|
friend |