Diff2::LevenshteinTable

Search for usage in LXR

Diff2::LevenshteinTable< SequencePair > Class Template Reference

#include <levenshteintable.h>

Public Member Functions

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

Protected Member Functions

 LevenshteinTable (const LevenshteinTable &table)
 
const LevenshteinTableoperator= (const LevenshteinTable &table)
 

Detailed Description

template<class SequencePair>
class Diff2::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 26 of file levenshteintable.h.

Constructor & Destructor Documentation

◆ LevenshteinTable() [1/2]

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

Definition at line 65 of file levenshteintable.h.

◆ LevenshteinTable() [2/2]

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

Definition at line 74 of file levenshteintable.h.

◆ ~LevenshteinTable()

template<class SequencePair >
Diff2::LevenshteinTable< SequencePair >::~LevenshteinTable ( )

Definition at line 83 of file levenshteintable.h.

Member Function Documentation

◆ chooseRoute()

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

Definition at line 177 of file levenshteintable.h.

◆ createListsOfMarkers()

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

Definition at line 195 of file levenshteintable.h.

◆ createTable()

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

This calculates the levenshtein distance of 2 sequences.

This object takes ownership of the argument

Definition at line 135 of file levenshteintable.h.

◆ dumpLevenshteinTable()

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

Debug method to check if the table is properly filled.

Definition at line 122 of file levenshteintable.h.

◆ getContent()

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

Definition at line 89 of file levenshteintable.h.

◆ height()

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

Definition at line 39 of file levenshteintable.h.

◆ setContent()

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

Definition at line 95 of file levenshteintable.h.

◆ setSize()

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

Definition at line 102 of file levenshteintable.h.

◆ width()

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

Definition at line 38 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 May 17 2024 11:51:39 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.