Cambridge SMT System
params.hpp File Reference

Convenience functions to parse parameters from a string. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  ucam::util::ParamsInit< T >
 Initializes a set of parameters from environment variables PARAMS_FILE or PARAMS. More...
 

Namespaces

 ucam
 
 ucam::util
 

Macros

#define LINFO(x)   std::cerr << "INFO:: " << x << std::endl;
 
#define LDEBUG(x)   std::cerr << "DEBUG:: " << x << std::endl;
 
#define LERROR(x)   std::cerr << "ERROR:: " << x << std::endl;
 
#define LWARN(x)   std::cerr << "WARNING:: " << x << std::endl;
 

Functions

template<typename T >
std::vector< T > ucam::util::ParseParamString (const std::string &stringparams, size_t pos=0)
 Function to parse string of parameters, e.g. separated by commas. More...
 
template<typename T >
void ucam::util::ParseParamString (const std::string &stringparams, std::vector< T > &params, size_t pos=0, size_t span=0)
 Version 2, passing output by reference... More...
 
void ucam::util::WriteParamFile (const std::string &filename, std::vector< float > params_)
 Write parameter vector to a file, with comma separators. More...
 

Detailed Description

Convenience functions to parse parameters from a string.

Remarks
This file is used by our dynamic libraries. functionality.
Date
2010-2012
Author
Rory Waite

Definition in file params.hpp.

Macro Definition Documentation

#define LDEBUG (   x)    std::cerr << "DEBUG:: " << x << std::endl;

Definition at line 33 of file params.hpp.

#define LERROR (   x)    std::cerr << "ERROR:: " << x << std::endl;

Definition at line 37 of file params.hpp.

#define LINFO (   x)    std::cerr << "INFO:: " << x << std::endl;

Definition at line 30 of file params.hpp.

#define LWARN (   x)    std::cerr << "WARNING:: " << x << std::endl;

Definition at line 40 of file params.hpp.