KompareDiff2::LevenshteinTable

Search for usage in LXR

KompareDiff2::LevenshteinTable< SequencePair > Class Template Reference

#include <levenshteintable.h>

Public Member Functions

 LevenshteinTable (const LevenshteinTable &table)=delete
 
 LevenshteinTable (unsigned int width, unsigned int height)
 
int chooseRoute (int c1, int c2, int c3, int current)
 
void createListsOfMarkers ()
 
unsigned int createTable (SequencePair *sequences)
 
void dumpLevenshteinTable ()
 
int getContent (unsigned int posX, unsigned int posY) const
 
unsigned int height () const
 
const LevenshteinTableoperator= (const LevenshteinTable &table)=delete
 
int setContent (unsigned int posX, unsigned int posY, int value)
 
bool setSize (unsigned int width, unsigned int height)
 
unsigned int width () const
 

Detailed Description

template<class SequencePair>
class KompareDiff2::LevenshteinTable< SequencePair >

Computes the Levenshtein distance between two sequences.

The actual sequence contents must be prepended with one virtual item each for easier index access.

Definition at line 30 of file levenshteintable.h.

Constructor & Destructor Documentation

◆ LevenshteinTable() [1/2]

template<class SequencePair >
KompareDiff2::LevenshteinTable< SequencePair >::LevenshteinTable ( )

Definition at line 75 of file levenshteintable.h.

◆ LevenshteinTable() [2/2]

template<class SequencePair >
KompareDiff2::LevenshteinTable< SequencePair >::LevenshteinTable ( unsigned int width,
unsigned int height )

Definition at line 82 of file levenshteintable.h.

Member Function Documentation

◆ chooseRoute()

template<class SequencePair >
int KompareDiff2::LevenshteinTable< SequencePair >::chooseRoute ( int c1,
int c2,
int c3,
int current )

Definition at line 177 of file levenshteintable.h.

◆ createListsOfMarkers()

template<class SequencePair >
void KompareDiff2::LevenshteinTable< SequencePair >::createListsOfMarkers ( )

Definition at line 194 of file levenshteintable.h.

◆ createTable()

template<class SequencePair >
unsigned int KompareDiff2::LevenshteinTable< SequencePair >::createTable ( SequencePair * sequences)

This calculates the levenshtein distance of 2 sequences.

This object takes ownership of the argument

Definition at line 136 of file levenshteintable.h.

◆ dumpLevenshteinTable()

template<class SequencePair >
void KompareDiff2::LevenshteinTable< SequencePair >::dumpLevenshteinTable ( )

Debug method to check if the table is properly filled.

Definition at line 124 of file levenshteintable.h.

◆ getContent()

template<class SequencePair >
int KompareDiff2::LevenshteinTable< SequencePair >::getContent ( unsigned int posX,
unsigned int posY ) const

Definition at line 91 of file levenshteintable.h.

◆ height()

template<class SequencePair >
unsigned int KompareDiff2::LevenshteinTable< SequencePair >::height ( ) const
inline

Definition at line 49 of file levenshteintable.h.

◆ setContent()

template<class SequencePair >
int KompareDiff2::LevenshteinTable< SequencePair >::setContent ( unsigned int posX,
unsigned int posY,
int value )

Definition at line 98 of file levenshteintable.h.

◆ setSize()

template<class SequencePair >
bool KompareDiff2::LevenshteinTable< SequencePair >::setSize ( unsigned int width,
unsigned int height )

Definition at line 106 of file levenshteintable.h.

◆ width()

template<class SequencePair >
unsigned int KompareDiff2::LevenshteinTable< SequencePair >::width ( ) const
inline

Definition at line 45 of file levenshteintable.h.


The documentation for this class was generated from the following file:
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Aug 30 2024 11:51:22 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.