WordPairComparison Class Reference

Implements a probabilistic measure for comparing two words. More...

#include <SimilarityMeasures.h>

List of all members.

Public Member Functions

 WordPairComparison (int rank, const StringSimilarityMeasure *sm)
 Constructor.
vector< double > distrEstimate (int minLen, int maxLen, int nSamples=1000) const
 Estimates the distribution of the distances (similarities) between two randomly generated words.
double comparePair (const Word &w1, const Word &w2, const vector< double > &measureDistr) const
 Compare the pair of words using probabilistic measure.
double comparePair (const Word &w1, const Word &w2) const
 Compare the pair of words using similarity measure.

Private Member Functions

 WordPairComparison (const WordPairComparison &)
WordPairComparisonoperator= (const WordPairComparison &)

Private Attributes

const StringSimilarityMeasurepSSM
int theRank

Detailed Description

Implements a probabilistic measure for comparing two words.

Basic Idea: ...

Definition at line 37 of file SimilarityMeasures.h.


Constructor & Destructor Documentation

WordPairComparison::WordPairComparison ( int  rank,
const StringSimilarityMeasure sm 
) [inline]

Constructor.

Parameters:
rank - the rank of a free group
sm - pointer to the corresponding similarity measure.

Definition at line 45 of file SimilarityMeasures.h.

WordPairComparison::WordPairComparison ( const WordPairComparison  )  [private]

Member Function Documentation

double WordPairComparison::comparePair ( const Word w1,
const Word w2 
) const

Compare the pair of words using similarity measure.

Parameters:
w1 - the first word
w2 - the second word.
Returns:
the distance (value of the similarity measure)
double WordPairComparison::comparePair ( const Word w1,
const Word w2,
const vector< double > &  measureDistr 
) const

Compare the pair of words using probabilistic measure.

Parameters:
w1 - the first word
w2 - the second word.
measureDistr - distribution of the distance between two random words
Returns:
an estimate of the probability of words w1 and w2 been generated independently
vector<double> WordPairComparison::distrEstimate ( int  minLen,
int  maxLen,
int  nSamples = 1000 
) const

Estimates the distribution of the distances (similarities) between two randomly generated words.

Parameters:
minLen - the minimal length of a randomly generated word
maxLen - the maximal length of a randomly generated word
nSamples - the number of pair samples to be generated (1000 is the default value).
Returns:
vector of the sorted distances (similarity measures)
WordPairComparison& WordPairComparison::operator= ( const WordPairComparison  )  [private]

Member Data Documentation

Definition at line 76 of file SimilarityMeasures.h.

Definition at line 77 of file SimilarityMeasures.h.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on Mon Sep 26 18:43:53 2011 for CRyptography And Groups (CRAG) by  doxygen 1.6.1