/disk4/html/www/moses/doxygen/mosesdecoder/mert/Util.h File Reference

#include <cmath>
#include <cstdlib>
#include <stdexcept>
#include <limits>
#include <vector>
#include <map>
#include <iostream>
#include <sstream>
#include <string>
#include <cstring>
#include "Types.h"

Go to the source code of this file.

Namespaces

namespace  MosesTuning

Defines

#define TRACE_ERR(str)   { }
#define NTH_ELEMENT3(begin, middle, end)   std::nth_element(begin, middle, end)
#define NTH_ELEMENT4(begin, middle, end, orderer)   std::nth_element(begin, middle, end, orderer)

Functions

int MosesTuning::verboselevel ()
int MosesTuning::setverboselevel (int v)
template<typename T >
bool MosesTuning::IsAlmostEqual (T expected, T actual, float round=kEPS)
size_t MosesTuning::getNextPound (std::string &str, std::string &substr, const std::string &delimiter)
void MosesTuning::split (const std::string &s, char delim, std::vector< std::string > &elems)
void MosesTuning::Tokenize (const char *str, const char delim, std::vector< std::string > *res)
template<typename T >
T MosesTuning::Scan (const std::string &input)
bool MosesTuning::EndsWith (const std::string &str, const char *suffix)
template<typename T >
std::string MosesTuning::stringify (T x)
ScoreStatsType MosesTuning::ConvertCharToScoreStatsType (const char *str)
ScoreStatsType MosesTuning::ConvertStringToScoreStatsType (const std::string &str)
FeatureStatsType MosesTuning::ConvertCharToFeatureStatsType (const char *str)
FeatureStatsType MosesTuning::ConvertStringToFeatureStatsType (const std::string &str)
std::string MosesTuning::trimStr (const std::string &Src, const std::string &c=" \r\n")
void MosesTuning::ResetUserTime ()
void MosesTuning::PrintUserTime (const std::string &message)
double MosesTuning::GetUserTime ()

Variables

const char MosesTuning::kDefaultDelimiterSymbol [] = " "
const float MosesTuning::kEPS = 0.0001f


Define Documentation

#define NTH_ELEMENT3 ( begin,
middle,
end   )     std::nth_element(begin, middle, end)

Definition at line 39 of file Util.h.

#define NTH_ELEMENT4 ( begin,
middle,
end,
orderer   )     std::nth_element(begin, middle, end, orderer)

Definition at line 40 of file Util.h.

#define TRACE_ERR ( str   )     { }

Definition at line 31 of file Util.h.


Generated on Thu Jul 6 00:31:35 2017 for Moses by  doxygen 1.5.9