Permutation Class Reference

#include <Permutation.h>

List of all members.

Public Member Functions

 Permutation (const std::string &alignment=std::string(), const int sourceLength=0, const int targetLength=0)
 ~Permutation ()
void clear ()
size_t size ()
void set (const std::string &alignment, const int sourceLength)
float distance (const Permutation &permCompare, const distanceMetric_t &strategy=HAMMING_DISTANCE) const
void dump () const
size_t getLength () const
std::vector< int > getArray () const
int getTargetLength () const

Static Public Member Functions

static std::string convertMosesToStandard (std::string const &alignment)
static std::vector< int > invert (std::vector< int > const &inVector)
static bool checkValidPermutation (std::vector< int > const &inVector)

Protected Member Functions

float calculateHamming (const Permutation &compare) const
float calculateKendall (const Permutation &compare) const

Protected Attributes

std::vector< int > m_array
int m_targetLength


Detailed Description

Definition at line 21 of file Permutation.h.


Constructor & Destructor Documentation

Permutation::Permutation ( const std::string &  alignment = std::string(),
const int  sourceLength = 0,
const int  targetLength = 0 
)

Permutation::~Permutation (  )  [inline]

Definition at line 28 of file Permutation.h.


Member Function Documentation

float Permutation::calculateHamming ( const Permutation compare  )  const [protected]

Definition at line 209 of file Permutation.cpp.

References getArray(), getLength(), and m_array.

Referenced by distance().

Here is the call graph for this function:

Here is the caller graph for this function:

float Permutation::calculateKendall ( const Permutation compare  )  const [protected]

Definition at line 231 of file Permutation.cpp.

References getArray(), getLength(), and m_array.

Referenced by distance().

Here is the call graph for this function:

Here is the caller graph for this function:

static bool Permutation::checkValidPermutation ( std::vector< int > const &  inVector  )  [static]

void Permutation::clear (  )  [inline]

Definition at line 30 of file Permutation.h.

References m_array.

static std::string Permutation::convertMosesToStandard ( std::string const &  alignment  )  [static]

float Permutation::distance ( const Permutation permCompare,
const distanceMetric_t strategy = HAMMING_DISTANCE 
) const

Definition at line 180 of file Permutation.cpp.

References calculateHamming(), calculateKendall(), getTargetLength(), HAMMING_DISTANCE, and KENDALL_DISTANCE.

Here is the call graph for this function:

void Permutation::dump (  )  const

Definition at line 29 of file Permutation.cpp.

References m_array.

vector< int > Permutation::getArray (  )  const

Definition at line 258 of file Permutation.cpp.

References m_array.

Referenced by calculateHamming(), and calculateKendall().

Here is the caller graph for this function:

size_t Permutation::getLength (  )  const

Definition at line 25 of file Permutation.cpp.

References m_array.

Referenced by calculateHamming(), and calculateKendall().

Here is the caller graph for this function:

int Permutation::getTargetLength (  )  const [inline]

Definition at line 46 of file Permutation.h.

References m_targetLength.

Referenced by distance().

Here is the caller graph for this function:

static std::vector<int> Permutation::invert ( std::vector< int > const &  inVector  )  [static]

void Permutation::set ( const std::string &  alignment,
const int  sourceLength 
)

size_t Permutation::size (  )  [inline]

Definition at line 33 of file Permutation.h.

References m_array.


Member Data Documentation

std::vector<int> Permutation::m_array [protected]

Definition at line 57 of file Permutation.h.

Referenced by calculateHamming(), calculateKendall(), clear(), dump(), getArray(), getLength(), and size().

int Permutation::m_targetLength [protected]

Definition at line 58 of file Permutation.h.

Referenced by getTargetLength().


The documentation for this class was generated from the following files:

Generated on Sat Jun 30 00:30:12 2012 for Moses by  doxygen 1.5.9