Classes | Public Types | Public Member Functions | Static Public Member Functions | Private Types | Private Member Functions | Private Attributes
EigenLab::Parser< Derived > Class Template Reference

#include <EigenLab.h>

List of all members.

Classes

struct  Chunk

Public Types

typedef std::map< std::string,
Value< Derived > > 
ValueMap

Public Member Functions

bool cacheExpressions () const
void clearCachedExpressions ()
void clearVar (const std::string &name)
Value< Derived > eval (const std::string &expression)
bool hasVar (const std::string &name)
 Parser ()
void setCacheExpressions (bool b)
Value< Derived > & var (const std::string &name)
ValueMapvars ()
 ~Parser ()

Static Public Member Functions

template<typename T >
static bool isNumber (const std::string &str, T *num=0)
template<typename T >
static std::string numberToString (T num, int precision=0)
static std::vector< std::string > split (const std::string &str, const char delimeter)
template<typename T >
static T stringToNumber (const std::string &str)
static std::string trim (const std::string &str)

Private Types

typedef std::vector< ChunkChunkArray
enum  ChunkType { VALUE = 0, VARIABLE, OPERATOR, FUNCTION }
typedef Derived::Index Index

Private Member Functions

void evalAddition (ChunkArray &chunks)
void evalAssignment (ChunkArray &chunks)
void evalFunction (const std::string &name, std::vector< std::string > &args, Value< Derived > &result)
bool evalFunction_1_lt (const std::string &name, Value< Derived > &arg, Value< Derived > &result, std::false_type)
bool evalFunction_1_lt (const std::string &name, Value< Derived > &arg, Value< Derived > &result, std::true_type)
bool evalFunction_2_lt (const std::string &name, Value< Derived > &arg0, Value< Derived > &arg1, Value< Derived > &result, std::false_type)
bool evalFunction_2_lt (const std::string &name, Value< Derived > &arg0, Value< Derived > &arg1, Value< Derived > &result, std::true_type)
void evalIndexRange (const std::string &str, int *first, int *last, int numIndices)
void evalIndices (ChunkArray &chunks)
void evalMatrixExpression (const std::string &str, Value< Derived > &mat)
void evalMultiplication (ChunkArray &chunks)
void evalNegations (ChunkArray &chunks)
void evalNumericRange (const std::string &str, Value< Derived > &mat)
void evalPowers (ChunkArray &chunks)
std::string::const_iterator findClosingBracket (const std::string &str, const std::string::const_iterator openingBracket, const char closingBracket) const
bool isFunction (const std::string &str) const
bool isOperator (const char c) const
bool isOperator (const std::string &str) const
bool isVariable (const std::string &name) const
std::vector< std::string > splitArguments (const std::string &str, const char delimeter) const
void splitEquationIntoChunks (const std::string &expression, ChunkArray &chunks, std::string &code)

Private Attributes

bool mCacheChunkedExpressions
std::map< std::string, ChunkArraymCachedChunkedExpressions
std::vector< std::string > mFunctions
std::string mOperators1
std::string mOperators2
ValueMap mVariables

Detailed Description

template<typename Derived = Eigen::MatrixXd>
class EigenLab::Parser< Derived >

Definition at line 131 of file EigenLab.h.


Member Typedef Documentation

template<typename Derived = Eigen::MatrixXd>
typedef std::vector<Chunk> EigenLab::Parser< Derived >::ChunkArray [private]

Definition at line 154 of file EigenLab.h.

template<typename Derived = Eigen::MatrixXd>
typedef Derived::Index EigenLab::Parser< Derived >::Index [private]

Definition at line 155 of file EigenLab.h.

template<typename Derived = Eigen::MatrixXd>
typedef std::map<std::string, Value<Derived> > EigenLab::Parser< Derived >::ValueMap

Definition at line 135 of file EigenLab.h.


Member Enumeration Documentation

template<typename Derived = Eigen::MatrixXd>
enum EigenLab::Parser::ChunkType [private]
Enumerator:
VALUE 
VARIABLE 
OPERATOR 
FUNCTION 

Definition at line 153 of file EigenLab.h.


Constructor & Destructor Documentation

template<typename Derived >
EigenLab::Parser< Derived >::Parser ( )

Definition at line 233 of file EigenLab.h.

template<typename Derived = Eigen::MatrixXd>
EigenLab::Parser< Derived >::~Parser ( ) [inline]

Definition at line 177 of file EigenLab.h.


Member Function Documentation

template<typename Derived = Eigen::MatrixXd>
bool EigenLab::Parser< Derived >::cacheExpressions ( ) const [inline]

Definition at line 172 of file EigenLab.h.

template<typename Derived = Eigen::MatrixXd>
void EigenLab::Parser< Derived >::clearCachedExpressions ( ) [inline]

Definition at line 174 of file EigenLab.h.

template<typename Derived = Eigen::MatrixXd>
void EigenLab::Parser< Derived >::clearVar ( const std::string &  name) [inline]

Definition at line 169 of file EigenLab.h.

template<typename Derived >
Value< Derived > EigenLab::Parser< Derived >::eval ( const std::string &  expression)

Definition at line 283 of file EigenLab.h.

template<typename Derived >
void EigenLab::Parser< Derived >::evalAddition ( ChunkArray chunks) [private]

Definition at line 1339 of file EigenLab.h.

template<typename Derived >
void EigenLab::Parser< Derived >::evalAssignment ( ChunkArray chunks) [private]

Definition at line 1421 of file EigenLab.h.

template<typename Derived>
void EigenLab::Parser< Derived >::evalFunction ( const std::string &  name,
std::vector< std::string > &  args,
Value< Derived > &  result 
) [private]

Definition at line 805 of file EigenLab.h.

template<typename Derived>
bool EigenLab::Parser< Derived >::evalFunction_1_lt ( const std::string &  name,
Value< Derived > &  arg,
Value< Derived > &  result,
std::false_type   
) [private]

Definition at line 703 of file EigenLab.h.

template<typename Derived>
bool EigenLab::Parser< Derived >::evalFunction_1_lt ( const std::string &  name,
Value< Derived > &  arg,
Value< Derived > &  result,
std::true_type   
) [private]

Definition at line 679 of file EigenLab.h.

template<typename Derived>
bool EigenLab::Parser< Derived >::evalFunction_2_lt ( const std::string &  name,
Value< Derived > &  arg0,
Value< Derived > &  arg1,
Value< Derived > &  result,
std::false_type   
) [private]

Definition at line 799 of file EigenLab.h.

template<typename Derived>
bool EigenLab::Parser< Derived >::evalFunction_2_lt ( const std::string &  name,
Value< Derived > &  arg0,
Value< Derived > &  arg1,
Value< Derived > &  result,
std::true_type   
) [private]

Definition at line 709 of file EigenLab.h.

template<typename Derived >
void EigenLab::Parser< Derived >::evalIndexRange ( const std::string &  str,
int *  first,
int *  last,
int  numIndices 
) [private]

Definition at line 525 of file EigenLab.h.

template<typename Derived >
void EigenLab::Parser< Derived >::evalIndices ( ChunkArray chunks) [private]

Definition at line 1100 of file EigenLab.h.

template<typename Derived>
void EigenLab::Parser< Derived >::evalMatrixExpression ( const std::string &  str,
Value< Derived > &  mat 
) [private]

Definition at line 581 of file EigenLab.h.

template<typename Derived >
void EigenLab::Parser< Derived >::evalMultiplication ( ChunkArray chunks) [private]

Definition at line 1248 of file EigenLab.h.

template<typename Derived >
void EigenLab::Parser< Derived >::evalNegations ( ChunkArray chunks) [private]

Definition at line 1139 of file EigenLab.h.

template<typename Derived>
void EigenLab::Parser< Derived >::evalNumericRange ( const std::string &  str,
Value< Derived > &  mat 
) [private]

Definition at line 1030 of file EigenLab.h.

template<typename Derived >
void EigenLab::Parser< Derived >::evalPowers ( ChunkArray chunks) [private]

Definition at line 1181 of file EigenLab.h.

template<typename Derived >
std::string::const_iterator EigenLab::Parser< Derived >::findClosingBracket ( const std::string &  str,
const std::string::const_iterator  openingBracket,
const char  closingBracket 
) const [private]

Definition at line 495 of file EigenLab.h.

template<typename Derived = Eigen::MatrixXd>
bool EigenLab::Parser< Derived >::hasVar ( const std::string &  name) [inline]

Definition at line 166 of file EigenLab.h.

template<typename Derived = Eigen::MatrixXd>
bool EigenLab::Parser< Derived >::isFunction ( const std::string &  str) const [inline, private]

Definition at line 198 of file EigenLab.h.

template<typename Derived >
template<typename T >
bool EigenLab::Parser< Derived >::isNumber ( const std::string &  str,
T num = 0 
) [static]

Definition at line 1565 of file EigenLab.h.

template<typename Derived = Eigen::MatrixXd>
bool EigenLab::Parser< Derived >::isOperator ( const char  c) const [inline, private]

Definition at line 196 of file EigenLab.h.

template<typename Derived >
bool EigenLab::Parser< Derived >::isOperator ( const std::string &  str) const [private]

Definition at line 1088 of file EigenLab.h.

template<typename Derived = Eigen::MatrixXd>
bool EigenLab::Parser< Derived >::isVariable ( const std::string &  name) const [inline, private]

Definition at line 195 of file EigenLab.h.

template<typename Derived >
template<typename T >
std::string EigenLab::Parser< Derived >::numberToString ( T  num,
int  precision = 0 
) [static]

Definition at line 1591 of file EigenLab.h.

template<typename Derived = Eigen::MatrixXd>
void EigenLab::Parser< Derived >::setCacheExpressions ( bool  b) [inline]

Definition at line 173 of file EigenLab.h.

template<typename Derived >
std::vector< std::string > EigenLab::Parser< Derived >::split ( const std::string &  str,
const char  delimeter 
) [static]

Definition at line 1549 of file EigenLab.h.

template<typename Derived >
std::vector< std::string > EigenLab::Parser< Derived >::splitArguments ( const std::string &  str,
const char  delimeter 
) const [private]

Definition at line 508 of file EigenLab.h.

template<typename Derived >
void EigenLab::Parser< Derived >::splitEquationIntoChunks ( const std::string &  expression,
ChunkArray chunks,
std::string &  code 
) [private]

Definition at line 316 of file EigenLab.h.

template<typename Derived >
template<typename T >
T EigenLab::Parser< Derived >::stringToNumber ( const std::string &  str) [static]

Definition at line 1579 of file EigenLab.h.

template<typename Derived >
std::string EigenLab::Parser< Derived >::trim ( const std::string &  str) [static]

Definition at line 1538 of file EigenLab.h.

template<typename Derived = Eigen::MatrixXd>
Value<Derived>& EigenLab::Parser< Derived >::var ( const std::string &  name) [inline]

Definition at line 163 of file EigenLab.h.

template<typename Derived = Eigen::MatrixXd>
ValueMap& EigenLab::Parser< Derived >::vars ( ) [inline]

Definition at line 162 of file EigenLab.h.


Member Data Documentation

template<typename Derived = Eigen::MatrixXd>
bool EigenLab::Parser< Derived >::mCacheChunkedExpressions [private]

Definition at line 156 of file EigenLab.h.

template<typename Derived = Eigen::MatrixXd>
std::map<std::string, ChunkArray> EigenLab::Parser< Derived >::mCachedChunkedExpressions [private]

Definition at line 157 of file EigenLab.h.

template<typename Derived = Eigen::MatrixXd>
std::vector<std::string> EigenLab::Parser< Derived >::mFunctions [private]

Definition at line 143 of file EigenLab.h.

template<typename Derived = Eigen::MatrixXd>
std::string EigenLab::Parser< Derived >::mOperators1 [private]

Definition at line 142 of file EigenLab.h.

template<typename Derived = Eigen::MatrixXd>
std::string EigenLab::Parser< Derived >::mOperators2 [private]

Definition at line 142 of file EigenLab.h.

template<typename Derived = Eigen::MatrixXd>
ValueMap EigenLab::Parser< Derived >::mVariables [private]

Definition at line 139 of file EigenLab.h.


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


grid_map_filters
Author(s): Péter Fankhauser , Martin Wermelinger
autogenerated on Tue Jul 9 2019 05:06:36