MosesTuning::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 24 of file Permutation.h.


Constructor & Destructor Documentation

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

MosesTuning::Permutation::~Permutation (  )  [inline]

Definition at line 31 of file Permutation.h.


Member Function Documentation

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

Definition at line 220 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 MosesTuning::Permutation::calculateKendall ( const Permutation compare  )  const [protected]

Definition at line 242 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 MosesTuning::Permutation::checkValidPermutation ( std::vector< int > const &  inVector  )  [static]

void MosesTuning::Permutation::clear (  )  [inline]

Definition at line 33 of file Permutation.h.

References m_array.

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

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

Definition at line 185 of file Permutation.cpp.

References calculateHamming(), calculateKendall(), debug, dump(), getTargetLength(), MosesTuning::HAMMING_DISTANCE, and MosesTuning::KENDALL_DISTANCE.

Here is the call graph for this function:

void MosesTuning::Permutation::dump (  )  const

Definition at line 33 of file Permutation.cpp.

References m_array.

Referenced by distance().

Here is the caller graph for this function:

vector< int > MosesTuning::Permutation::getArray (  )  const

Definition at line 273 of file Permutation.cpp.

References m_array.

Referenced by calculateHamming(), and calculateKendall().

Here is the caller graph for this function:

size_t MosesTuning::Permutation::getLength (  )  const

Definition at line 29 of file Permutation.cpp.

References m_array.

Referenced by calculateHamming(), and calculateKendall().

Here is the caller graph for this function:

int MosesTuning::Permutation::getTargetLength (  )  const [inline]

Definition at line 49 of file Permutation.h.

References m_targetLength.

Referenced by distance().

Here is the caller graph for this function:

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

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

size_t MosesTuning::Permutation::size (  )  [inline]

Definition at line 36 of file Permutation.h.

References m_array.


Member Data Documentation

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

Definition at line 60 of file Permutation.h.

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

Definition at line 61 of file Permutation.h.

Referenced by getTargetLength().


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

Generated on Thu Jul 6 00:34:19 2017 for Moses by  doxygen 1.5.9