Minsky
|
represents the units (in sense of dimensional analysis) of a variable. More...
#include <units.h>
Public Member Functions | |
Units () | |
Units (const std::string &) | |
std::string | str () const |
std::string | latexStr () const |
insert braces around exponents for LaTeX processing More... | |
void | normalise () |
represents the units (in sense of dimensional analysis) of a variable.
first argument is the base unit (eg metre, second), and the second is it's power (eg {{"m",1},{"s",-1}} => m/s)
minsky::Units::Units | ( | const std::string & | x | ) |
Definition at line 56 of file variableType.cc.
string minsky::Units::latexStr | ( | ) | const |
insert braces around exponents for LaTeX processing
Definition at line 40 of file variableType.cc.
References minsky::to_string().
|
inline |
Definition at line 42 of file units.h.
Referenced by minsky::UnitsExpressionWalker::operator*=(), minsky::UnitsExpressionWalker::operator/=(), minsky::Derivative::units(), and minsky::OperationBase::unitsBinOpCase().
string minsky::Units::str | ( | ) | const |
Definition at line 33 of file variableType.cc.
Referenced by minsky::GodleyIcon::stockVarUnits(), minsky::SwitchIcon::units(), minsky::VariableBase::units(), and minsky::VariableBase::unitsStr().