libqalculate-3.21.0

Classes | Macros | Typedefs | Enumerations
Calculator.h File Reference
`#include <libqalculate/includes.h>`
`#include <libqalculate/util.h>`
`#include <sys/time.h>`
`#include <libqalculate/MathStructure.h>`

## Classes
struct | PlotParameters
| Parameters passed to plotting functions. More...
struct | PlotDataParameters
| Parameters for plot data series. More...
class | CalculatorMessage
| A message with information to the user. Primarily used for errors and warnings. More...
struct | Element
class | Calculator
| The almighty calculator class. More...

## Macros
#define | MESSAGE_STAGE_CONVERSION -4
| Message stages.
#define | MESSAGE_STAGE_CONVERSION_PARSING -3
#define | MESSAGE_STAGE_CALCULATION -2
#define | MESSAGE_STAGE_PARSING -1
#define | MESSAGE_STAGE_UNSET 0
#define | MESSAGE_CATEGORY_NONE 0
| Message categories.
#define | MESSAGE_CATEGORY_PARSING 1
#define | MESSAGE_CATEGORY_WIDE_INTERVAL 10
#define | MESSAGE_CATEGORY_IMPLICIT_MULTIPLICATION 11
#define | UFV_LENGTHS 20

## Typedefs
typedef std::vector< Prefix * > | p_type

## Enumerations
enum | MessageType { MESSAGE_INFORMATION, MESSAGE_WARNING, MESSAGE_ERROR }
| Message types.
enum | AutomaticFractionFormat { AUTOMATIC_FRACTION_OFF, AUTOMATIC_FRACTION_SINGLE, AUTOMATIC_FRACTION_AUTO, AUTOMATIC_FRACTION_DUAL }
enum | AutomaticApproximation { AUTOMATIC_APPROXIMATION_OFF, AUTOMATIC_APPROXIMATION_SINGLE, AUTOMATIC_APPROXIMATION_AUTO, AUTOMATIC_APPROXIMATION_DUAL }
enum | { VARIABLE_ID_I = 200, VARIABLE_ID_PLUS_INFINITY = 201, VARIABLE_ID_MINUS_INFINITY = 202, VARIABLE_ID_UNDEFINED = 203, VARIABLE_ID_X = 300, VARIABLE_ID_Y = 301, VARIABLE_ID_Z = 302, VARIABLE_ID_N = 303, VARIABLE_ID_C = 304, VARIABLE_ID_PERCENT = 350, VARIABLE_ID_PERMILLE = 351, VARIABLE_ID_PERMYRIAD = 352 }
enum | { UNIT_ID_EURO = 510, UNIT_ID_BYN = 515, UNIT_ID_BTC = 520, UNIT_ID_SECOND = 550, UNIT_ID_MINUTE = 551, UNIT_ID_HOUR = 552, UNIT_ID_DAY = 553, UNIT_ID_MONTH = 554, UNIT_ID_YEAR = 555, UNIT_ID_KELVIN = 560, UNIT_ID_RANKINE = 561, UNIT_ID_CELSIUS = 562, UNIT_ID_FAHRENHEIT = 563 }
enum | { ELEMENT_CLASS_NOT_DEFINED, ALKALI_METALS, ALKALI_EARTH_METALS, LANTHANIDES, ACTINIDES, TRANSITION_METALS, METALS, METALLOIDS, NONMETALS, HALOGENS, NOBLE_GASES, TRANSACTINIDES }
enum | TemperatureCalculationMode { TEMPERATURE_CALCULATION_HYBRID, TEMPERATURE_CALCULATION_ABSOLUTE, TEMPERATURE_CALCULATION_RELATIVE }

FunctionArgument::copy
virtual Argument * copy() const
VariableArgument::type
virtual int type() const
FunctionArgument::subprintlong
virtual std::string subprintlong() const
ExpressionName::suffix
bool suffix
If the name has a suffix. If set to true, the part of the name after an underscore should be treated ...
Definition: ExpressionItem.h:27
UserFunction::setSubfunction
void setSubfunction(size_t index, std::string subfunction)
Calculator::nameTaken
bool nameTaken(std::string name, ExpressionItem *object=NULL)
VectorArgument::print
virtual std::string print() const
Number::intValue
int intValue(bool *overflow=NULL) const
Calculator::getExchangeRatesUrl
std::string getExchangeRatesUrl(int index=1)
ExpressionItem::preferredName
virtual const ExpressionName & preferredName(bool abbreviation=false, bool use_unicode=false, bool plural=false, bool reference=false, bool(*can_display_unicode_string_function)(const char *, void *)=NULL, void *can_display_unicode_string_arg=NULL) const
SUBTYPE_COMPOSITE_UNIT
@ SUBTYPE_COMPOSITE_UNIT
class CompositeUnit
Definition: Unit.h:24
Prefix::setUnicodeName
void setUnicodeName(std::string unicode_name)
Calculator::getDecimalPoint
const std::string & getDecimalPoint() const
DataObject::getPropertyInputString
std::string getPropertyInputString(DataProperty *property)
PlotParameters::y_log_base
int y_log_base
Logarithimic base for the y-axis. Default: 10.
Definition: Calculator.h:110
DateArgument
A date argument.
Definition: Function.h:568
EvaluationOptions::keep_prefixes
bool keep_prefixes
If unit prefixes in original expression will be kept. Default: false.
Definition: includes.h:677
UserFunction::formula
std::string formula() const
ParseOptions::brackets_as_parentheses
bool brackets_as_parentheses
Interpret square brackets equally to parentheses (not only for vectors/matrices). Default; false.
Definition: includes.h:648
ExpressionItem::hasNameCaseSensitive
virtual size_t hasNameCaseSensitive(const std::string &sname) const
Argument::alerts
bool alerts() const
UserFunction::setFormula
void setFormula(std::string new_formula, int argc_=-1, int max_argc_=0)
Unit::convert
bool convert(Unit *u, MathStructure &mvalue, MathStructure &exp) const
FunctionSubtype
FunctionSubtype
Type of mathematical function.
Definition: Function.h:53
BooleanArgument::copy
virtual Argument * copy() const
SUBTYPE_KNOWN_VARIABLE
@ SUBTYPE_KNOWN_VARIABLE
class KnownVariable
Definition: Variable.h:70
Number::imaginaryPart
Number imaginaryPart() const
PlotParameters::auto_x_min
bool auto_x_min
If the minimum x-axis value shall be set automatically (otherwise uses x_min). Default: true.
Definition: Calculator.h:92
DynamicVariable
Abstract base class for variables with a value which is recalculated when the precision has changed.
Definition: Variable.h:356
ASSUMPTION_SIGN_NEGATIVE
@ ASSUMPTION_SIGN_NEGATIVE
x < 0
Definition: Variable.h:56
MathStructure::childrenUpdated
void childrenUpdated(bool recursive=false)
Calculator::loadGlobalDataSets
bool loadGlobalDataSets()
DataObjectArgument
Data object function argument.
Definition: DataSet.h:282
TextArgument::subtest
virtual bool subtest(MathStructure &value, const EvaluationOptions &eo) const
Calculator::parseAddId
size_t parseAddId(MathFunction *f, const std::string &str, const ParseOptions &po, bool persistent=false)
Prefix.h
Calculator::localizeExpression
std::string localizeExpression(std::string str, const ParseOptions &po=default_parse_options) const
AngleArgument::subprintlong
virtual std::string subprintlong() const
ExpressionItem::isApproximate
virtual bool isApproximate() const
EvaluationOptions::approximation
ApproximationMode approximation
How exact the result must be. Default: TRY_EXACT.
Definition: includes.h:671
Calculator::getOptimalBinaryPrefix
BinaryPrefix * getOptimalBinaryPrefix(int exp2, int exp=1) const
Calculator::convertTimeOut
MathStructure convertTimeOut(std::string str, Unit *from_unit, Unit *to_unit, int milliseconds, const EvaluationOptions &eo=default_user_evaluation_options)
Prefix::unicodeName
const std::string & unicodeName(bool return_short_if_no_uni=true) const
ParseOptions::base
int base
Base of parsed numbers. Default: 10.
Definition: includes.h:635
VectorArgument::type
virtual int type() const
PrintOptions::min_decimals
int min_decimals
Minimum number of decimals to display for numbers. Default: 0.
Definition: includes.h:459
ExpressionItemArgument::subtest
virtual bool subtest(MathStructure &value, const EvaluationOptions &eo) const
SUBTYPE_DATA_SET
@ SUBTYPE_DATA_SET
class DataSet
Definition: Function.h:59
PlotDataParameters
Parameters for plot data series.
Definition: Calculator.h:125
EvaluationOptions
Options for calculation.
Definition: includes.h:669
Prefix::value
virtual Number value() const =0
MathStructure::operator[]
MathStructure & operator[](size_t index)
TextArgument::print
virtual std::string print() const
Calculator.h
ExpressionItem::category
virtual const std::string & category() const
MathFunction::printCondition
std::string printCondition()
TextArgument::type
virtual int type() const
Number::zeta
bool zeta()
Calculator::resetUnits
void resetUnits()
Calculator::hasFunction
bool hasFunction(MathFunction *f)
EvaluationOptions::sync_units
bool sync_units
If units will be synced/converted to allow evaluation (ex. 1 min + 1 s=60 s+ 1 s = 61 s)....
Definition: includes.h:673
KnownVariable::isKnown
bool isKnown() const
Definition: Variable.h:294
Number::precision
int precision(int calculate_from_interval=0) const
IntegerArgument::type
virtual int type() const
Calculator::canFetch
bool canFetch()
PlotDataParameters::test_continuous
bool test_continuous
Check if data is continuous.
Definition: Calculator.h:137
PrintOptions::show_ending_zeroes
bool show_ending_zeroes
Show ending zeroes for approximate numbers to indicate precision (ex.1.2300000 instead of 1....
Definition: includes.h:421
EvaluationOptions::local_currency_conversion
bool local_currency_conversion
Convert to local currency when optimal conversion is enabled.
Definition: includes.h:721
Calculator
The almighty calculator class.
Definition: Calculator.h:266
Argument::printlong
std::string printlong() const
ExpressionName::completion_only
bool completion_only
Use only for completion (useful for unicode letter alternatives)
Definition: ExpressionItem.h:39
ExpressionItem::findName
virtual const ExpressionName & findName(int abbreviation=-1, int use_unicode=-1, int plural=-1, bool(*can_display_unicode_string_function)(const char *, void *)=NULL, void *can_display_unicode_string_arg=NULL) const
Calculator::loadLocalDefinitions
bool loadLocalDefinitions()
PrintOptions::number_fraction_format
NumberFractionFormat number_fraction_format
If rational numbers will be displayed with decimals, as a fraction, or something in between....
Definition: includes.h:417
MathStructure::setUndefined
void setUndefined(bool preserve_precision=false)
VariableArgument::subtest
virtual bool subtest(MathStructure &value, const EvaluationOptions &eo) const
Number::pi
void pi()
INTERVAL_CALCULATION_NONE
@ INTERVAL_CALCULATION_NONE
Ignores uncertainties and uses the middle value of intervals.
Definition: includes.h:615
UnitArgument
Definition: Function.h:697
MathFunction::condition
std::string condition() const
PrintOptions::preserve_format
bool preserve_format
Preserves the format of the structure (no sorting, no changed prefixes, no improved division multipli...
Definition: includes.h:487
FRACTION_COMBINED
@ FRACTION_COMBINED
Display as an integer and a fraction (ex. 3 + 1/2)
Definition: includes.h:347
ExpressionItem::type
virtual int type() const =0
SortOptions::prefix_currencies
bool prefix_currencies
Put currency units before quantity. Default: true.
Definition: includes.h:353
PlotParameters::auto_x_max
bool auto_x_max
If the maximum x-axis value shall be set automatically (otherwise uses x_max). Default: true.
Definition: Calculator.h:96
ASSUMPTION_TYPE_NONE
@ ASSUMPTION_TYPE_NONE
Multiplication is NOT commutative; do not use.
Definition: Variable.h:36
NumberArgument::print
virtual std::string print() const
BooleanArgument::print
virtual std::string print() const
Argument::setZeroForbidden
void setZeroForbidden(bool forbid_zero)
VectorArgument::subtest
virtual bool subtest(MathStructure &value, const EvaluationOptions &eo) const
YesterdayVariable::representsPositive
virtual bool representsPositive(bool=false)
Definition: Variable.h:476
EvaluationOptions::allow_complex
bool allow_complex
If complex numbers will be used for evaluation. Default: true.
Definition: includes.h:693
Calculator::restoreState
void restoreState()
Deprecated: does nothing.
Calculator::addBuiltinVariables
void addBuiltinVariables()
PlotParameters::x_log_base
int x_log_base
Logarithimic base for the x-axis. Default: 10.
Definition: Calculator.h:112
MatrixArgument::subprintlong
virtual std::string subprintlong() const
DataObject::setNonlocalizedKeyProperty
void setNonlocalizedKeyProperty(DataProperty *property, std::string s_value)
SUBTYPE_USER_FUNCTION
@ SUBTYPE_USER_FUNCTION
class UseFunction
Definition: Function.h:57
Calculator::addBuiltinUnits
void addBuiltinUnits()
DataObject
A a data set object.
Definition: DataSet.h:24
Unit.h
UnitArgument::type
virtual int type() const
Calculator::loadGlobalDefinitions
bool loadGlobalDefinitions()
ExpressionItem::title
virtual const std::string & title(bool return_name_if_no_title=true, bool use_unicode=false, bool(*can_display_unicode_string_function)(const char *, void *)=NULL, void *can_display_unicode_string_arg=NULL) const
ArgumentSet::type
virtual int type() const
DataPropertyArgument::type
int type() const
ExpressionItem::isActive
virtual bool isActive() const
Variable::representsPositive
virtual bool representsPositive(bool=false)
Definition: Variable.h:149
ExpressionName::plural
bool plural
If the name is in plural form.
Definition: ExpressionItem.h:31
BinaryPrefix::exponent
int exponent(int iexp=1) const
ParsingMode
ParsingMode
Definition: includes.h:601
Calculator::resetFunctions
void resetFunctions()
Calculator::clearBuffers
void clearBuffers()
Calculator::getBestUnit
Unit * getBestUnit(Unit *u, bool allow_only_div=false, bool convert_to_local_currency=true)
Calculator::getDegUnit
Unit * getDegUnit()
FunctionArgument
A function argument.
Definition: Function.h:660
ExpressionItemType
ExpressionItemType
Type of ExpressionItem.
Definition: includes.h:71
Argument::zeroForbidden
bool zeroForbidden() const
EvaluationOptions::auto_post_conversion
AutoPostConversion auto_post_conversion
If and how units will be automatically converted. Does not affect syncing of units....
Definition: includes.h:705
DecimalPrefix::type
int type() const
ExpressionItem::setRegistered
void setRegistered(bool is_registered)
For internal use.
Calculator::unsetLocale
void unsetLocale()
Prefix::preferredDisplayName
const ExpressionName & preferredDisplayName(bool abbreviation=false, bool use_unicode=false, bool plural=false, bool reference=false, bool(*can_display_unicode_string_function)(const char *, void *)=NULL, void *can_display_unicode_string_arg=NULL) const
CompositeUnit::clear
virtual void clear()
TextArgument::subprintlong
virtual std::string subprintlong() const
EvaluationOptions::complex_number_form
ComplexNumberForm complex_number_form
Complex number form. Default: COMPLEX_NUMBER_FORM_RECTANGULAR.
Definition: includes.h:719
MathStructure::clearVector
void clearVector(bool preserve_precision=false)
PrintOptions::interval_display
IntervalDisplay interval_display
How number intervals will be displayed. Default: INTERVAL_DISPLAY_INTERVAL.
Definition: includes.h:501
Argument::test
bool test(MathStructure &value, int index, MathFunction *f, const EvaluationOptions &eo=default_evaluation_options) const
DecimalPrefix::DecimalPrefix
DecimalPrefix(int exp10, std::string long_name, std::string short_name="", std::string unicode_name="")
MathFunction::setArgumentDefinition
void setArgumentDefinition(size_t index, Argument *argdef)
NumberArgument::set
virtual void set(const Argument *arg)
includes.h
Calculator::saveState
void saveState()
Deprecated: does nothing.
UnknownVariable
A variable with unknown value.
Definition: Variable.h:176
ExpressionItem::getName
virtual const ExpressionName & getName(size_t index) const
PlotLegendPlacement
PlotLegendPlacement
Placement of legend.
Definition: includes.h:223
DecimalPrefix::value
Number value() const
Number::negate
bool negate()
SUBTYPE_UNKNOWN_VARIABLE
@ SUBTYPE_UNKNOWN_VARIABLE
class UnknownVariable
Definition: Variable.h:68
Calculator::nextMessage
CalculatorMessage * nextMessage()
Calculator::addId
size_t addId(MathStructure *mstruct, bool persistent=false)
Calculator::abortPrint
void abortPrint(void)
Deprecated: use abort()
SortOptions
Options for ordering the parts of a mathematical expression/result before display.
Definition: includes.h:351
ParseOptions
Options for parsing expressions.
Definition: includes.h:623
Calculator::setLocale
void setLocale()
Calculator::RPNStackEnter
bool RPNStackEnter(MathStructure *mstruct, int msecs, const EvaluationOptions &eo=default_user_evaluation_options)
DecimalPrefix
A decimal (metric) prefix.
Definition: Prefix.h:199
MathStructure.h
SUBTYPE_ALIAS_UNIT
@ SUBTYPE_ALIAS_UNIT
class AliasUnit
Definition: Unit.h:22
PrintOptions::division_sign
DivisionSign division_sign
Sign used for display of division. Default: DIVISION_SIGN_DIVISION_SLASH.
Definition: includes.h:451
ParseOptions::comma_as_separator
bool comma_as_separator
If true commas will ignored if another character is the default decimal sign, to allow commas to be u...
Definition: includes.h:646
NumberPrefix::NumberPrefix
NumberPrefix(const Number &nr, std::string long_name, std::string short_name="", std::string unicode_name="")
Unit::isParentOf
virtual bool isParentOf(Unit *u) const
ExpressionItemArgument::print
virtual std::string print() const
TextArgument
A text argument.
Definition: Function.h:547
PrintOptions::restrict_fraction_length
bool restrict_fraction_length
Restrict the length of numerators and demonitor as integers in decimal mode for fractional display of...
Definition: includes.h:495
Argument::type
virtual int type() const
EvaluationOptions::assume_denominators_nonzero
int assume_denominators_nonzero
If simplification will be made easier by assuming that denominators with unknown value not is zero....
Definition: includes.h:697
FunctionArgument::type
virtual int type() const
PrintOptions::digit_grouping
DigitGrouping digit_grouping
Digit grouping separator. Default: DIGIT_GROUPING_NONE.
Definition: includes.h:503
Calculator::calculateRPNLogicalNot
bool calculateRPNLogicalNot(int msecs, const EvaluationOptions &eo=default_user_evaluation_options, MathStructure *parsed_struct=NULL)
MathStructure::clear
void clear(bool preserve_precision=false)
ApproximationMode
ApproximationMode
Definition: includes.h:535
Calculator::stopControl
void stopControl(void)
ParseOptions::preserve_format
bool preserve_format
Preserve the expression structure as much as possible. Default: false.
Definition: includes.h:654
PrintOptions::allow_factorization
bool allow_factorization
Allows factorization to occur in the output (should be set to true if the structure has been factoriz...
Definition: includes.h:489
Argument::parse
virtual MathStructure parse(const std::string &str, const ParseOptions &po=default_parse_options) const
NumberPrefix::value
Number value() const
MathFunction::clearArgumentDefinitions
void clearArgumentDefinitions()
PrintOptions::abbreviate_names
bool abbreviate_names
Prefer abbreviated names of variables, units, functions etc. Default: true.
Definition: includes.h:423
PrintOptions::improve_division_multipliers
bool improve_division_multipliers
Multiply numerator and denominator to get integers (ex. (6x+y)/2z instead of (3x+0....
Definition: includes.h:469
Calculator::printMathStructureTimeOut
std::string printMathStructureTimeOut(const MathStructure &mstruct, int milliseconds=100000, const PrintOptions &op=default_print_options)
Deprecated: use print() instead.
Prefix::shortName
const std::string & shortName(bool return_long_if_no_short=true, bool use_unicode=false) const
PrintOptions::excessive_parenthesis
bool excessive_parenthesis
Use parentheses even when not necessary. Default: false.
Definition: includes.h:455
DateArgument::subprintlong
virtual std::string subprintlong() const
EvaluationOptions::do_polynomial_division
bool do_polynomial_division
Use polynomial division to simplify the result. Default: true.
Definition: includes.h:715
Calculator::getOptimalDecimalPrefix
DecimalPrefix * getOptimalDecimalPrefix(int exp10, int exp=1, bool all_prefixes=true) const
STRUCTURING_EXPAND
@ STRUCTURING_EXPAND
Simplify the result as much as possible and expand (minimal factorization, normally the same as STRUC...
Definition: includes.h:552
Prefix::preferredInputName
const ExpressionName & preferredInputName(bool abbreviation=false, bool use_unicode=false, bool plural=false, bool reference=false, bool(*can_display_unicode_string_function)(const char *, void *)=NULL, void *can_display_unicode_string_arg=NULL) const
Number::isInfinite
bool isInfinite(bool ignore_imag=true) const
EvaluationOptions::keep_zero_units
bool keep_zero_units
If units with zero quantity will be preserved. Default: true.
Definition: includes.h:703
NowVariable
Definition: Variable.h:484
ExpressionItem::description
virtual const std::string & description() const
Calculator::loadGlobalCurrencies
bool loadGlobalCurrencies()
Calculator::addBuiltinFunctions
void addBuiltinFunctions()
Number.h
IntegerArgument::print
virtual std::string print() const
PlotParameters::legend_placement
PlotLegendPlacement legend_placement
Where the plot legend shall be placed. Default: PLOT_LEGEND_TOP_RIGHT.
Definition: Calculator.h:120
DataProperty::DataProperty
DataProperty(DataSet *parent_set, std::string s_name="", std::string s_title="", std::string s_description="")
NumberPrefix::setValue
void setValue(const Number &nr)
MatrixArgument::copy
virtual Argument * copy() const
PlotParameters::x_min
float x_min
Minimum x-axis value.
Definition: Calculator.h:100
IntegerArgument
A definition for integer arguments.
Definition: Function.h:489
DataPropertyArgument::subprintlong
virtual std::string subprintlong() const
ParseOptions::hexadecimal_twos_complement
bool hexadecimal_twos_complement
Negative hexadecimal numbers uses two's complement representation. All hexadecimal numbers starting w...
Definition: includes.h:662
DataObject::getNonlocalizedKeyProperty
const std::string & getNonlocalizedKeyProperty(DataProperty *property)
UnknownVariable::setAssumptions
void setAssumptions(Assumptions *ass)
ParseOptions::rpn
bool rpn
If Reverse Polish Notation syntax will be used. Default: false (deprecated, use parsing_mode = PARSIN...
Definition: includes.h:633
BinaryPrefix::setExponent
void setExponent(int iexp)
Calculator::calculateAndPrint
std::string calculateAndPrint(std::string str, int msecs=10000, const EvaluationOptions &eo=default_user_evaluation_options, const PrintOptions &po=default_print_options)
FileArgument
Definition: Function.h:746
DataObject::getPropertyStruct
const MathStructure * getPropertyStruct(DataProperty *property)
FileArgument::copy
virtual Argument * copy() const
AssumptionType
AssumptionType
Type assumption.
Definition: Variable.h:34
DataObject::DataObject
DataObject(DataSet *parent_set)
CompositeUnit
A unit consisting of a number of other units.
Definition: Unit.h:275
FileArgument::print
virtual std::string print() const
PrintOptions::hexadecimal_twos_complement
bool hexadecimal_twos_complement
Negative hexadecimal numbers uses two's complement representation. All hexadecimal numbers starting w...
Definition: includes.h:513
PrintOptions::use_unit_prefixes
bool use_unit_prefixes
Use prefixes for units when appropriate. Default: true.
Definition: includes.h:429
DecimalPrefix::exponent
int exponent(int iexp=1) const
DataObjectArgument::copy
Argument * copy() const
PlotParameters::show_all_borders
bool show_all_borders
If the plot shall be surrounded by borders on all sides (not just axis). Default: false.
Definition: Calculator.h:118
MathStructure::set
void set(const MathStructure &o, bool merge_precision=false)
PrintOptions::lower_case_numbers
bool lower_case_numbers
Use lower case for non-numeric characters for bases > 10. Default: false.
Definition: includes.h:413
Prefix::setName
void setName(const ExpressionName &ename, size_t index=1)
VariableArgument::copy
virtual Argument * copy() const
KnownVariable
A variable with a known value.
Definition: Variable.h:248
VariableArgument::subprintlong
virtual std::string subprintlong() const
PrintOptions::binary_bits
unsigned int binary_bits
Number of bits used for binary numbers. Set to 0 for automatic. Default: 0.
Definition: includes.h:515
DataObject::getPropertyDisplayString
std::string getPropertyDisplayString(DataProperty *property)
ExpressionItem::setDescription
virtual void setDescription(std::string descr_)
Unit::subtype
virtual int subtype() const
Calculator::stillHasUnit
bool stillHasUnit(Unit *u)
SymbolicArgument::print
virtual std::string print() const
PrintOptions::prefix
Prefix * prefix
Force use of a specific prefix for units if not NULL. Default: NULL.
Definition: includes.h:471
DecimalPrefix::setExponent
void setExponent(int iexp)
MathFunction::type
virtual int type() const
VectorArgument
A std::vector argument.
Definition: Function.h:589
APPROXIMATION_EXACT
@ APPROXIMATION_EXACT
Allow only exact results.
Definition: includes.h:537
Calculator::hasGVFS
bool hasGVFS()
Deprecated: gvfs is not needed anymore.
DateArgument::subtest
virtual bool subtest(MathStructure &value, const EvaluationOptions &eo) const
SUBTYPE_VARIABLE
@ SUBTYPE_VARIABLE
class Variable
Definition: Variable.h:66
ExpressionName::ExpressionName
ExpressionName()
Calculator::convert
MathStructure convert(const MathStructure &mstruct, std::string composite_, const EvaluationOptions &eo=default_user_evaluation_options, MathStructure *units=NULL)
NumberFractionFormat
NumberFractionFormat
Definition: includes.h:339
STRUCTURING_FACTORIZE
@ STRUCTURING_FACTORIZE
Factorize the result.
Definition: includes.h:554
PlotParameters::filetype
PlotFileType filetype
The image type to save as. Set to PLOT_FILETYPE_AUTO to guess from file extension.
Definition: Calculator.h:84
PrintOptions::use_denominator_prefix
bool use_denominator_prefix
If set to true, prefixes will be split between numerator and denominator in a unit expression (millim...
Definition: includes.h:437
SymbolicArgument::subprintlong
virtual std::string subprintlong() const
ParseOptions::unended_function
MathStructure * unended_function
If non-NULL will be set to unfinished function at the end of the expression (if there is one)....
Definition: includes.h:652
Number::catalan
void catalan()
Calculator::useIntervalArithmetic
void useIntervalArithmetic(bool use_interval_arithmetic=true)
PrintOptions::allow_non_usable
bool allow_non_usable
If it is not necessary that the displayed expression can be parsed correctly. Default: false.
Definition: includes.h:445
MathFunction
Abstract base class for mathematical functions.
Definition: Function.h:70
DataObject::eraseProperty
void eraseProperty(DataProperty *property)
ASSUMPTION_SIGN_NONPOSITIVE
@ ASSUMPTION_SIGN_NONPOSITIVE
x <= 0
Definition: Variable.h:58
DateArgument::copy
virtual Argument * copy() const
Unit::isCurrency
bool isCurrency() const
Number::isFloatingPoint
bool isFloatingPoint() const
Calculator::usesIntervalArithmetic
bool usesIntervalArithmetic() const
EvaluationOptions::protected_function
MathFunction * protected_function
Do not calculate the specified function. Default: NULL.
Definition: includes.h:717
PlotParameters::y_min
float y_min
Minimum y-axis value.
Definition: Calculator.h:98
Calculator::message
CalculatorMessage * message()
Number::subtract
bool subtract(const Number &o)
CompositeUnit::subtype
virtual int subtype() const
PrintOptions::can_display_unicode_string_arg
void * can_display_unicode_string_arg
Argument passed to can_display_unicode_string_function. Default: NULL.
Definition: includes.h:483
Calculator::loadGlobalPrefixes
bool loadGlobalPrefixes()
Calculator::defaultAssumptions
Assumptions * defaultAssumptions()
PlotDataParameters::smoothing
PlotSmoothing smoothing
Plot smoothing.
Definition: Calculator.h:129
StructureType
StructureType
Types for MathStructure.
Definition: MathStructure.h:25
PlotDataParameters::yaxis2
bool yaxis2
Use scale on second y-axis.
Definition: Calculator.h:133
PrintOptions
Options for formatting and display of mathematical structures/results.
Definition: includes.h:406
AliasUnit::isParentOf
virtual bool isParentOf(Unit *u) const
PlotDataParameters::style
PlotStyle style
Plot style.
Definition: Calculator.h:131
KnownVariable::expression
virtual std::string expression() const
Calculator::stopPrintControl
void stopPrintControl(void)
Deprecated: use stopControl()
PrintOptions::spell_out_logical_operators
bool spell_out_logical_operators
If logical operators will be spelled as AND and OR instead of && and ||. Default: false.
Definition: includes.h:491
Unit::setAsSIUnit
void setAsSIUnit()
ExpressionName::name
std::string name
The name.
Definition: ExpressionItem.h:41
Calculator::setPrecision
void setPrecision(int precision=DEFAULT_PRECISION)
PARSING_MODE_ADAPTIVE
@ PARSING_MODE_ADAPTIVE
The default adaptive mode works as the "parse implicit multiplication first" mode,...
Definition: includes.h:603
PrintOptions::place_units_separately
bool place_units_separately
Isolate units at the end of the displayed expression (ex. x/y m/s instead of (x m)/(y s))....
Definition: includes.h:427
ArgumentSet::subprintlong
virtual std::string subprintlong() const
FileArgument::subprintlong
virtual std::string subprintlong() const
SortOptions::minus_last
bool minus_last
If true, avoid placing negative terms first. Default: true.
Definition: includes.h:355
Prefix::preferredName
const ExpressionName & preferredName(bool abbreviation=false, bool use_unicode=false, bool plural=false, bool reference=false, bool(*can_display_unicode_string_function)(const char *, void *)=NULL, void *can_display_unicode_string_arg=NULL) const
EvaluationOptions::interval_calculation
IntervalCalculation interval_calculation
Algorithm used for calculation of uncertainty propagation / intervals. This does not affect calculati...
Definition: includes.h:725
AngleArgument::print
virtual std::string print() const
ExpressionItem.h
AngleArgument::subtest
virtual bool subtest(MathStructure &value, const EvaluationOptions &eo) const
MatrixArgument::print
virtual std::string print() const
EvaluationOptions::calculate_variables
bool calculate_variables
If known variables will be replaced by their value. Default: true.
Definition: includes.h:679
ExpressionItem::clearNonReferenceNames
virtual void clearNonReferenceNames()
NumberArgument
A definition for numerical arguments.
Definition: Function.h:444
EvaluationOptions::test_comparisons
int test_comparisons
If comparisons will be evaluated (ex. 5>2 => 1). Default: true.
Definition: includes.h:683
PrintOptions::negative_exponents
bool negative_exponents
If true, negative exponents will be used instead of division (ex. 5/x^2 becomes 5*x^-2)....
Definition: includes.h:439
PrintOptions::lower_case_e
bool lower_case_e
Use lower case e for base-10 exponent (ex. 1.2e8 instead of 1.2E8). Default: false.
Definition: includes.h:415
Calculator::abort
bool abort()
PlotParameters::x_max
float x_max
Maximum x-axis value.
Definition: Calculator.h:104
ExpressionName::reference
bool reference
If the name shall be used as a fixed reference. If this is set to true, the name will kept as it is i...
Definition: ExpressionItem.h:33
Calculator::print
std::string print(const MathStructure &mstruct, int milliseconds=100000, const PrintOptions &po=default_print_options)
EvaluationOptions::sync_nonlinear_unit_relations
bool sync_nonlinear_unit_relations
If units with complex/non-linear relations (ex. degress celsius and fahrenheit) will synced/converted...
Definition: includes.h:675
DataObject::getProperty
const std::string & getProperty(DataProperty *property, int *is_approximate=NULL)
PrintOptions::comma
const std::string & comma() const
Returns the comma sign used (default sign or comma_sign)
FunctionArgument::subtest
virtual bool subtest(MathStructure &value, const EvaluationOptions &eo) const
POST_CONVERSION_BASE
@ POST_CONVERSION_BASE
Convert to base units.
Definition: includes.h:565
PrintOptions::limit_implicit_multiplication
bool limit_implicit_multiplication
Use a format compatible with ParseOptions::limit_implicit_multiplication. Default: false.
Definition: includes.h:443
AliasUnit
An unit with relation to another unit.
Definition: Unit.h:172
Calculator::addPrefix
Prefix * addPrefix(Prefix *p)
STRUCTURING_HYBRID
@ STRUCTURING_HYBRID
Deprecated: use STRUCTURING_SIMPLIFY instead.
Definition: includes.h:556
PrintOptions::multiplication_sign
MultiplicationSign multiplication_sign
Sign used for display of multiplication. Default: MULTIPLICATION_SIGN_DOT.
Definition: includes.h:449
PARSING_MODE_IMPLICIT_MULTIPLICATION_FIRST
@ PARSING_MODE_IMPLICIT_MULTIPLICATION_FIRST
In the "parse implicit multiplication first" mode, implicit multiplication is parsed before explicit ...
Definition: includes.h:605
Unit::setUseWithPrefixesByDefault
void setUseWithPrefixesByDefault(bool use_with_prefixes)
DataPropertyArgument::copy
Argument * copy() const
MathFunction::getArgumentDefinition
Argument * getArgumentDefinition(size_t index)
STRUCTURING_NONE
@ STRUCTURING_NONE
Do not do any factorization or additional simplifications.
Definition: includes.h:550
AngleArgument::type
virtual int type() const
Calculator::clearMessages
void clearMessages()
NumberPrefix
A prefix with a free numerical value.
Definition: Prefix.h:277
Calculator::useDecimalPoint
void useDecimalPoint(bool comma_as_separator=false)
Argument::~Argument
virtual ~Argument()
ParseOptions::unknowns_enabled
bool unknowns_enabled
If left-over characters will be parsed as symbols. Default: true.
Definition: includes.h:629
NumberArgument::subprintlong
virtual std::string subprintlong() const
DataObjectArgument::subprintlong
virtual std::string subprintlong() const
Number::e
void e(bool use_cached_number=true)
Argument
A mathematical function argument definition with free value and base class for all argument definitio...
Definition: Function.h:277
APPROXIMATION_APPROXIMATE
@ APPROXIMATION_APPROXIMATE
Calculate the result approximately directly.
Definition: includes.h:541
Calculator::usesBinaryPrefixes
int usesBinaryPrefixes() const
DataObjectArgument::type
int type() const
UptimeVariable
Definition: Variable.h:499
PrintOptions::indicate_infinite_series
bool indicate_infinite_series
Show that the digit series of a number continues forever with three dots, instead of rounding (ex....
Definition: includes.h:419
ParseOptions::twos_complement
bool twos_complement
Negative binary numbers uses two's complement representation. All binary numbers starting with 1 are ...
Definition: includes.h:660
TomorrowVariable
Definition: Variable.h:454
MathStructure::childUpdated
void childUpdated(size_t index, bool recursive=false)
Prefix::clearNonReferenceNames
void clearNonReferenceNames()
UserFunction::subtype
int subtype() const
TodayVariable::representsPositive
virtual bool representsPositive(bool=false)
Definition: Variable.h:446
CompositeUnit::generateMathStructure
virtual MathStructure generateMathStructure(bool make_division=false, bool set_null_prefixes=false) const
VariableArgument
Definition: Function.h:730
Calculator::printingAborted
bool printingAborted(void)
Deprecated: use aborted()
Number
A number.
Definition: Number.h:48
AliasUnit::setExpression
virtual void setExpression(std::string relation)
ASSUMPTION_SIGN_UNKNOWN
@ ASSUMPTION_SIGN_UNKNOWN
x = ?
Definition: Variable.h:50
Calculator::terminateThreads
void terminateThreads()
YesterdayVariable
Definition: Variable.h:469
INTERVAL_CALCULATION_SIMPLE_INTERVAL_ARITHMETIC
@ INTERVAL_CALCULATION_SIMPLE_INTERVAL_ARITHMETIC
Treats all intervals as uncorrelated.
Definition: includes.h:619
Calculator::loadDefinitions
int loadDefinitions(const char *file_name, bool is_user_defs=true, bool check_duplicates_of_global=false)
DataPropertyArgument
Data property function argument.
Definition: DataSet.h:259
PARSING_MODE_CONVENTIONAL
@ PARSING_MODE_CONVENTIONAL
In the conventional mode implicit multiplication does not differ from explicit multiplication (<quote...
Definition: includes.h:607
PlotParameters::y_label
std::string y_label
Y-axis label.
Definition: Calculator.h:78
TomorrowVariable::representsPositive
virtual bool representsPositive(bool=false)
Definition: Variable.h:461
Prefix::longName
const std::string & longName(bool return_short_if_no_long=true, bool use_unicode=false) const
Unit::useWithPrefixesByDefault
bool useWithPrefixesByDefault() const
PrintOptions::can_display_unicode_string_function
bool(* can_display_unicode_string_function)(const char *, void *)
Function that returns true if a text string with unicode signs can be properly displayed....
Definition: includes.h:481
Prefix::Prefix
Prefix(std::string long_name, std::string short_name="", std::string unicode_name="")
Calculator::setDefaultAssumptions
void setDefaultAssumptions(Assumptions *ass)
Calculator::reset
void reset()
MathOperation
MathOperation
Mathematical operations.
Definition: includes.h:267
PrintOptions::short_multiplication
bool short_multiplication
Avoid using multiplication sign, when appropriate. Default: true.
Definition: includes.h:441
DateArgument::print
virtual std::string print() const
EvaluationOptions::isolate_x
bool isolate_x
If a varaible will be isolated to the left side in equations/comparisons (ex. x+y=2 => x=2-y)....
Definition: includes.h:685
PrintOptions::sort_options
SortOptions sort_options
Options for the order of values in the displayed expression. Default: default_sort_options.
Definition: includes.h:475
UnitArgument::print
virtual std::string print() const
Calculator::separateWhereExpression
bool separateWhereExpression(std::string &str, std::string &where_str, const EvaluationOptions &eo) const
Split an expression string after and before " where ".
CompositeUnit::get
virtual Unit * get(size_t index, int *exp=NULL, Prefix **prefix=NULL) const
PrintOptions::decimalpoint
const std::string & decimalpoint() const
Returns the decimal sign used (default sign or decimalpoint_sign)
TYPE_UNIT
@ TYPE_UNIT
class Unit
Definition: includes.h:77
PrintOptions::preserve_precision
bool preserve_precision
Use the internal precision of each number instead of global precision. Default: false.
Definition: includes.h:499
PrintOptions::use_all_prefixes
bool use_all_prefixes
Use prefixes for all units (even imperial and similar ones). Default: false.
Definition: includes.h:435
DataObject::isUserModified
bool isUserModified() const
Variable::type
virtual int type() const
Definition: Variable.h:135
UnknownVariable::UnknownVariable
UnknownVariable()
NumberPrefix::type
int type() const
Unit
A unit for measurement.
Definition: Unit.h:38
PrecisionVariable
Dynamic variable for Pi.
Definition: Variable.h:427
TextArgument::copy
virtual Argument * copy() const
PlotParameters::auto_y_min
bool auto_y_min
If the minimum y-axis value shall be set automatically (otherwise uses y_min). Default: true.
Definition: Calculator.h:90
DateArgument::type
virtual int type() const
KnownVariable::isExpression
virtual bool isExpression() const
Number::Number
Number()
TYPE_FUNCTION
@ TYPE_FUNCTION
class MathFunction
Definition: includes.h:75
AliasUnit_Composite::print
virtual std::string print(bool plural_, bool short_, bool use_unicode=false, bool(*can_display_unicode_string_function)(const char *, void *)=NULL, void *can_display_unicode_string_arg=NULL) const
ExpressionName::case_sensitive
bool case_sensitive
If the name is case sensitive. The default behavior is that abbreviations are case sensitive and othe...
Definition: ExpressionItem.h:37
APPROXIMATION_EXACT_VARIABLES
@ APPROXIMATION_EXACT_VARIABLES
Used internally.
Definition: includes.h:543
Calculator::getNearestDecimalPrefix
DecimalPrefix * getNearestDecimalPrefix(int exp10, int exp=1) const
FileArgument::subtest
virtual bool subtest(MathStructure &value, const EvaluationOptions &eo) const
AssumptionSign
AssumptionSign
Signedness assumption.
Definition: Variable.h:48
MathFunction::setCondition
void setCondition(std::string expression)
Number::setApproximate
void setApproximate(bool is_approximate=true)
Argument::tests
bool tests() const
PrintOptions::comma_sign
std::string comma_sign
Comma sign or empty string to use default comma sign. Default: empty string.
Definition: includes.h:477
Argument::print
virtual std::string print() const
ExpressionItem::precision
virtual int precision() const
Calculator::startPrintControl
void startPrintControl(int milliseconds=0)
Deprecated: use startControl()
PlotParameters::y_log
bool y_log
If a logarithimic scale shall be used for the y-axis. Default: false.
Definition: Calculator.h:106
PrintOptions::twos_complement
bool twos_complement
Negative binary numbers uses two's complement representation. All binary numbers starting with 1 are ...
Definition: includes.h:511
TYPE_VARIABLE
@ TYPE_VARIABLE
class Variable
Definition: includes.h:73
PlotStyle
PlotStyle
Plot type/style.
Definition: includes.h:234
Calculator::convertToBestUnit
MathStructure convertToBestUnit(const MathStructure &mstruct, const EvaluationOptions &eo=default_user_evaluation_options, bool convert_to_si_units=true)
MathFunction::subtype
virtual int subtype() const
Prefix::hasName
size_t hasName(const std::string &sname, bool case_sensitive=true) const
VariableArgument::print
virtual std::string print() const
ExpressionName::abbreviation
bool abbreviation
If the name is an abbreviation.
Definition: ExpressionItem.h:25
MatrixArgument::subtest
virtual bool subtest(MathStructure &value, const EvaluationOptions &eo) const
ASSUMPTION_TYPE_COMPLEX
@ ASSUMPTION_TYPE_COMPLEX
im(x) != 0
Definition: Variable.h:40
Number::exp10
bool exp10()
BooleanArgument
A boolean argument.
Definition: Function.h:680
Unit::isSIUnit
bool isSIUnit() const
CompositeUnit::countUnits
virtual size_t countUnits() const
Calculator::getExactDecimalPrefix
DecimalPrefix * getExactDecimalPrefix(int exp10, int exp=1) const
Prefix::type
virtual int type() const =0
ExpressionItem::refcount
virtual int refcount() const
POST_CONVERSION_NONE
@ POST_CONVERSION_NONE
Do not do any conversion of units in addition to syncing.
Definition: includes.h:561
ExpressionItem::preferredInputName
virtual const ExpressionName & preferredInputName(bool abbreviation=false, bool use_unicode=false, bool plural=false, bool reference=false, bool(*can_display_unicode_string_function)(const char *, void *)=NULL, void *can_display_unicode_string_arg=NULL) const
MatrixArgument::type
virtual int type() const
Argument::setName
void setName(std::string name_)
UnitArgument::subtest
virtual bool subtest(MathStructure &value, const EvaluationOptions &eo) const
Prefix::hasNameCaseSensitive
size_t hasNameCaseSensitive(const std::string &sname) const
Number::recip
bool recip()
Unit::isChildOf
virtual bool isChildOf(Unit *u) const
PrintOptions::use_prefixes_for_all_units
bool use_prefixes_for_all_units
Use prefixes for currencies if unit prefixes are om. Default: false.
Definition: includes.h:431
MathFunction::testCondition
bool testCondition(const MathStructure &vargs)
PlotParameters::auto_y_max
bool auto_y_max
If the maximum y-axis value shall be set automatically (otherwise uses y_max). Default: true.
Definition: Calculator.h:94
Calculator::loadExchangeRates
bool loadExchangeRates()
Prefix::setLongName
void setLongName(std::string long_name)
Unit::print
virtual std::string print(bool plural_, bool short_, bool use_unicode=false, bool(*can_display_unicode_string_function)(const char *, void *)=NULL, void *can_display_unicode_string_arg=NULL) const
EvaluationOptions::expand
int expand
If factors (and bases) containing addition will be expanded (ex. z(x+y)=zx+zy). Default: true.
Definition: includes.h:687
UnitArgument::subprintlong
virtual std::string subprintlong() const
NumberArgument::subtest
virtual bool subtest(MathStructure &value, const EvaluationOptions &eo) const
UnknownVariable::subtype
virtual int subtype() const
Definition: Variable.h:223
PrefixType
PrefixType
Types for prefix classes.
Definition: Prefix.h:23
BooleanArgument::subprintlong
virtual std::string subprintlong() const
IntegerArgument::subprintlong
virtual std::string subprintlong() const
BinaryPrefix::value
Number value() const
ParseOptions::variables_enabled
bool variables_enabled
If variables will be parsed. Default: true.
Definition: includes.h:625
UnitSubtype
UnitSubtype
Type of unit.
Definition: Unit.h:18
MathStructure::MathStructure
MathStructure()
Calculator::getNearestBinaryPrefix
BinaryPrefix * getNearestBinaryPrefix(int exp2, int exp=1) const
PrintOptions::custom_time_zone
int custom_time_zone
Offset in minute for custom time zone. Default: 0.
Definition: includes.h:509
ExpressionName::unicode
bool unicode
If the name contains unicode characters.
Definition: ExpressionItem.h:29
Number::euler
void euler()
PlotParameters::grid
bool grid
If a grid shall be shown in the plot. Default: false.
Definition: Calculator.h:114
Unit::setSystem
void setSystem(std::string s_system)
MathStructure::set_nocopy
void set_nocopy(MathStructure &o, bool merge_precision=false)
PlotParameters::color
bool color
Set to true for colored plot, false for monochrome. Default: true.
Definition: Calculator.h:88
BooleanArgument::subtest
virtual bool subtest(MathStructure &value, const EvaluationOptions &eo) const
Calculator::checkExchangeRatesDate
bool checkExchangeRatesDate(unsigned int n_days=7, bool force_check=false, bool send_warning=false, int n=-1)
Unit::system
const std::string & system() const
PrintOptions::round_halfway_to_even
bool round_halfway_to_even
If true round halfway numbers to nearest even number, otherwise round upwards. Default: false.
Definition: includes.h:467
PrintOptions::spacious
bool spacious
If space will be used to make the output look nicer. Default: true.
Definition: includes.h:453
EvaluationOptions::split_squares
bool split_squares
If powers with exponent 1/2 that only have an approximate result will be split to the least base (sqr...
Definition: includes.h:701
AutoPostConversion
AutoPostConversion
Definition: includes.h:559
EvaluationOptions::calculate_functions
bool calculate_functions
If functions will be calculated. Default: true.
Definition: includes.h:681
Calculator::startControl
void startControl(int milliseconds=0)
Assumptions
An assumption about an unknown mathematical value.
Definition: Variable.h:78
MathStructure::setType
void setType(StructureType mtype)
Argument::rationalPolynomial
bool rationalPolynomial() const
Number::isApproximate
bool isApproximate() const
BinaryPrefix::type
int type() const
Calculator::parse
MathStructure parse(std::string str, const ParseOptions &po=default_parse_options)
DataSet::calculate
virtual int calculate(MathStructure &mstruct, const MathStructure &vargs, const EvaluationOptions &eo)
PlotDataParameters::title
std::string title
Title label.
Definition: Calculator.h:127
Calculator::loadGlobalVariables
bool loadGlobalVariables()
DataPropertyArgument::subtest
virtual bool subtest(MathStructure &value, const EvaluationOptions &eo) const
UserFunction
A user defined mathematical function.
Definition: Function.h:233
PrintOptions::use_prefixes_for_currencies
bool use_prefixes_for_currencies
Use all decimal SI prefixes. If false, prefixes which is not a multiple of thousand (centi,...
Definition: includes.h:433
Argument::copy
virtual Argument * copy() const
SUBTYPE_FUNCTION
@ SUBTYPE_FUNCTION
class MathFunction
Definition: Function.h:55
UnknownVariable::representsPositive
virtual bool representsPositive(bool=false)
PlotParameters::x_log
bool x_log
If a logarithimic scale shall be used for the x-axis. Default: false.
Definition: Calculator.h:108
ExpressionItem::hasName
virtual size_t hasName(const std::string &sname, bool case_sensitive=true) const
ExpressionItem::preferredDisplayName
virtual const ExpressionName & preferredDisplayName(bool abbreviation=false, bool use_unicode=false, bool plural=false, bool reference=false, bool(*can_display_unicode_string_function)(const char *, void *)=NULL, void *can_display_unicode_string_arg=NULL) const
CalculatorMessage
A message with information to the user. Primarily used for errors and warnings.
Definition: Calculator.h:177
Number::exp2
bool exp2()
POST_CONVERSION_OPTIMAL
@ POST_CONVERSION_OPTIMAL
Convert to the the least amount of units. Non-SI units is kept (if optimal), but for conversion only ...
Definition: includes.h:567
UnitArgument::copy
virtual Argument * copy() const
Calculator::printingControlled
bool printingControlled(void) const
Deprecated: use isControlled()
Calculator::getExchangeRatesFileName
std::string getExchangeRatesFileName(int index=1)
Calculator::saveDefinitions
bool saveDefinitions()
AliasUnit::isChildOf
virtual bool isChildOf(Unit *u) const
CompositeUnit::add
virtual void add(Unit *u, int exp=1, Prefix *prefix=NULL)
PlotParameters
Parameters passed to plotting functions.
Definition: Calculator.h:74
PrintOptions::restrict_to_parent_precision
bool restrict_to_parent_precision
Displays children of the structure with no higher precision than the parent. Default: true.
Definition: includes.h:493
PrintOptions::use_min_decimals
bool use_min_decimals
Enable use of min_decimals. False is equivalent to a min_decimals value of zero. Default: true.
Definition: includes.h:463
ExpressionItemArgument::type
virtual int type() const
UnknownVariable::assumptions
Assumptions * assumptions()
PlotParameters::font
std::string font
Font used for text.
Definition: Calculator.h:86
ParseOptions::functions_enabled
bool functions_enabled
If functions will be parsed. Default: true.
Definition: includes.h:627
Variable
Abstract base class for variables.
Definition: Variable.h:125
SymbolicArgument::subtest
virtual bool subtest(MathStructure &value, const EvaluationOptions &eo) const
NowVariable::representsPositive
virtual bool representsPositive(bool=false)
Definition: Variable.h:491
POST_CONVERSION_OPTIMAL_SI
@ POST_CONVERSION_OPTIMAL_SI
Convert to the least amount of units. Non-SI units are converted to SI units.
Definition: includes.h:563
AngleArgument::copy
virtual Argument * copy() const
InternalPrintStruct
Definition: includes.h:524
MathStructure::clearMatrix
void clearMatrix(bool preserve_precision=false)
ParseOptions::dot_as_separator
bool dot_as_separator
If true dots will ignored if another character is the default decimal sign, to allow dots to be used ...
Definition: includes.h:644
Calculator::calculateRPNRegister
bool calculateRPNRegister(size_t index, int msecs, const EvaluationOptions &eo=default_user_evaluation_options)
ComparisonResult
ComparisonResult
The result of a comparison of two values.
Definition: includes.h:207
Calculator::getExactPrefix
Prefix * getExactPrefix(const Number &o, int exp=1) const
AliasUnit_Composite
A subunit in a CompositeUnit.
Definition: Unit.h:238
Calculator::stillHasVariable
bool stillHasVariable(Variable *v)
EvaluationOptions::transform_trigonometric_functions
bool transform_trigonometric_functions
Mainly for internal use. Default: true.
Definition: includes.h:723
CompositeUnit::containsRelativeTo
virtual bool containsRelativeTo(Unit *u) const
Prefix::clearNames
void clearNames()
Calculator::findMatchingUnit
Unit * findMatchingUnit(const MathStructure &mstruct)
Argument::getCustomCondition
std::string getCustomCondition() const
NumberArgument::copy
virtual Argument * copy() const
ParseOptions::read_precision
ReadPrecisionMode read_precision
If and when precisions will be read from number of digits in a number. Default: DONT_READ_PRECISION.
Definition: includes.h:642
KnownVariable::subtype
int subtype() const
Definition: Variable.h:308
ExpressionName
A name for an expression item (function, variable or unit)
Definition: ExpressionItem.h:22
FRACTION_FRACTIONAL
@ FRACTION_FRACTIONAL
Display as fraction (ex. 4/3)
Definition: includes.h:345
AliasUnit::setInverseExpression
virtual void setInverseExpression(std::string inverse)
ExpressionItem::hasChanged
virtual bool hasChanged() const
VectorArgument::subprintlong
virtual std::string subprintlong() const
ArgumentSet::copy
virtual Argument * copy() const
KnownVariable::representsPositive
virtual bool representsPositive(bool=false)
Number::realPart
Number realPart() const
PrintOptions::decimalpoint_sign
std::string decimalpoint_sign
Decimal sign or empty string to use default decimal sign. Default: empty string.
Definition: includes.h:479
Element
Definition: Calculator.h:246
Calculator::loadGlobalUnits
bool loadGlobalUnits()
Calculator::busy
bool busy()
SymbolicArgument::copy
virtual Argument * copy() const
EvaluationOptions::mixed_units_conversion
MixedUnitsConversion mixed_units_conversion
Shows time as h + min + s, imperial length as ft + in, etc. Default: MIXED_UNITS_CONVERSION_DEFAULT.
Definition: includes.h:707
APPROXIMATION_TRY_EXACT
@ APPROXIMATION_TRY_EXACT
Try to make the result as exact as possible.
Definition: includes.h:539
PlotDataParameters::xaxis2
bool xaxis2
Use scale on second x-axis.
Definition: Calculator.h:135
Calculator::getGraUnit
Unit * getGraUnit()
EvaluationOptions::combine_divisions
bool combine_divisions
Use behaviour from version <= 0.9.12 which returns (x+y)/z instead of x/y+y/z if expand = true.
Definition: includes.h:689
Variable::isKnown
virtual bool isKnown() const =0
EvaluationOptions::structuring
StructuringMode structuring
If the evaluation result will be expanded or factorized Default: STRUCTURING_NONE.
Definition: includes.h:709
ExpressionItem
Abstract base class for functions, variables and units.
Definition: ExpressionItem.h:82
Calculator::unlocalizeExpression
std::string unlocalizeExpression(std::string str, const ParseOptions &po=default_parse_options) const
Calculator::getExchangeRatesTime
time_t getExchangeRatesTime(int index=-1)
BinaryPrefix
A binary prefix.
Definition: Prefix.h:238
Calculator::separateToExpression
bool separateToExpression(std::string &str, std::string &to_str, const EvaluationOptions &eo, bool keep_modifiers=false, bool allow_empty_from=false) const
Calculator::exchangeRatesUsed
int exchangeRatesUsed() const
Check if exchange rates has been used since resetExchangeRatesUsed() was last called.
PrintOptions::time_zone
TimeZone time_zone
Time zone for time and date. Default: TIME_ZONE_LOCAL.
Definition: includes.h:507
Calculator::localToString
std::string localToString(bool include_spaces=true) const
FRACTION_DECIMAL
@ FRACTION_DECIMAL
Display numbers in decimal, not fractional, format (ex. 0.333333)
Definition: includes.h:341
Function.h
MathFunction::args
int args() const
Number::square
bool square()
Argument::setCustomCondition
void setCustomCondition(std::string condition)
DataProperty
A data set property.
Definition: DataSet.h:122
DateArgument::parse
virtual void parse(MathStructure *mstruct, const std::string &str, const ParseOptions &po=default_parse_options) const
Calculator::calculate
bool calculate(MathStructure *mstruct, std::string str, int msecs, const EvaluationOptions &eo=default_user_evaluation_options, MathStructure *parsed_struct=NULL, MathStructure *to_struct=NULL, bool make_to_division=true)
KnownVariable::get
virtual const MathStructure & get()
Prefix
Abstract class for prefixes.
Definition: Prefix.h:34
Number::isMinusInfinity
bool isMinusInfinity(bool ignore_imag=false) const
Calculator::fetchExchangeRates
bool fetchExchangeRates(int seconds, std::string wget_args)
Deprecated: wget arguments are not used.
NumberArgument::type
virtual int type() const
Calculator::stillHasFunction
bool stillHasFunction(MathFunction *f)
ExpressionItemArgument
Argument for functions, variables and units.
Definition: Function.h:641
Prefix::setShortName
void setShortName(std::string short_name)
Argument::set
virtual void set(const Argument *arg)
IntegerArgument::copy
virtual Argument * copy() const
KnownVariable::KnownVariable
KnownVariable()
ExpressionItem::clearNames
virtual void clearNames()
MessageType
MessageType
Message types.
Definition: Calculator.h:142
PrintOptions::base_display
BaseDisplay base_display
How prefixes for numbers in non-decimal bases will be displayed. Default: BASE_DISPLAY_NONE.
Definition: includes.h:411
PrintOptions::max_decimals
int max_decimals
Maximum number of decimals to display for numbers. A negative value disables the limit....
Definition: includes.h:461
Calculator::getExactBinaryPrefix
BinaryPrefix * getExactBinaryPrefix(int exp2, int exp=1) const
Argument::name
std::string name() const
BooleanArgument::type
virtual int type() const
Number::isPlusInfinity
bool isPlusInfinity(bool ignore_imag=false) const
PlotParameters::title
std::string title
Title label.
Definition: Calculator.h:76
ASSUMPTION_SIGN_NONNEGATIVE
@ ASSUMPTION_SIGN_NONNEGATIVE
x >= 0
Definition: Variable.h:54
PlotParameters::filename
std::string filename
Image to save plot to. If empty shows plot in a window on the screen.
Definition: Calculator.h:82
MathFunction::minargs
int minargs() const
ComparisonType
ComparisonType
Comparison signs for comparison structures.
Definition: includes.h:289
Prefix::getName
const ExpressionName & getName(size_t index) const
PlotParameters::linewidth
int linewidth
Width of lines. Default: 2.
Definition: Calculator.h:116
ParseOptions::units_enabled
bool units_enabled
If units will be parsed. Default: true.
Definition: includes.h:631
PrintOptions::halfexp_to_sqrt
bool halfexp_to_sqrt
Transform raised to 1/2 to square root and raised to 1/3 to cbrt function. Default: true.
Definition: includes.h:457
Prefix::name
const std::string & name(bool short_default=true, bool use_unicode=false, bool(*can_display_unicode_string_function)(const char *, void *)=NULL, void *can_display_unicode_string_arg=NULL) const
MESSAGE_CATEGORY_NONE
#define MESSAGE_CATEGORY_NONE
Message categories.
Definition: Calculator.h:170
Calculator::loadGlobalFunctions
bool loadGlobalFunctions()
FileArgument::type
virtual int type() const
EvaluationOptions::allow_infinite
bool allow_infinite
If infinite numbers will be used for evaluation. Default: true.
Definition: includes.h:695
PrintOptions::date_time_format
DateTimeFormat date_time_format
Format for time and date. Default: DATE_TIME_FORMAT_ISO.
Definition: includes.h:505
ArgumentMinMaxPreDefinition
ArgumentMinMaxPreDefinition
Predefined max and min values for number and integer arguments.
Definition: Function.h:44
Prefix::findName
const ExpressionName & findName(int abbreviation=-1, int use_unicode=-1, int plural=-1, bool(*can_display_unicode_string_function)(const char *, void *)=NULL, void *can_display_unicode_string_arg=NULL) const
FRACTION_DECIMAL_EXACT
@ FRACTION_DECIMAL_EXACT
Display as fraction if necessary to get an exact display of the result (ex. 1/3, but 0....
Definition: includes.h:343
Calculator::hasVariable
bool hasVariable(Variable *v)
ExpressionItemArgument::subprintlong
virtual std::string subprintlong() const
ParseOptions::angle_unit
AngleUnit angle_unit
Default angle unit for trigonometric functions. Default: ANGLE_UNIT_NONE.
Definition: includes.h:650
ASSUMPTION_SIGN_NONZERO
@ ASSUMPTION_SIGN_NONZERO
x != 0
Definition: Variable.h:60
Calculator::canPlot
bool canPlot()
PlotFileType
PlotFileType
File type for saving plot to image.
Definition: includes.h:255
Number::multiply
bool multiply(const Number &o)
IntegerArgument::subtest
virtual bool subtest(MathStructure &value, const EvaluationOptions &eo) const
MathStructure::setAborted
void setAborted(bool preserve_precision=false)
ExpressionItemArgument::copy
virtual Argument * copy() const
EvaluationOptions::isolate_var
const MathStructure * isolate_var
If set will decide which variable to isolate in an equation. Default: NULL.
Definition: includes.h:713
DataObject::setProperty
void setProperty(DataProperty *property, std::string s_value, int is_approximate=-1)
Calculator::delId
void delId(size_t id)
Calculator::getPrefix
Prefix * getPrefix(size_t index) const
Calculator::getId
MathStructure * getId(size_t id)
AliasUnit::subtype
virtual int subtype() const
FunctionArgument::print
virtual std::string print() const
CompositeUnit::print
virtual std::string print(bool plural_, bool short_, bool use_unicode=false, bool(*can_display_unicode_string_function)(const char *, void *)=NULL, void *can_display_unicode_string_arg=NULL) const
PrintOptions::hide_underscore_spaces
bool hide_underscore_spaces
Replace underscores in names with spaces, unless name has suffix. Default: false.
Definition: includes.h:485
BinaryPrefix::BinaryPrefix
BinaryPrefix(int exp2, std::string long_name, std::string short_name="", std::string unicode_name="")
PrintOptions::is_approximate
bool * is_approximate
If not NULL will be set to true if the output is approximate. Default: NULL.
Definition: includes.h:473
DynamicVariable::representsPositive
virtual bool representsPositive(bool=false)
Definition: Variable.h:384
DataSet
A data set.
Definition: DataSet.h:197
MathStructure
A structure representing a mathematical value/expression/result.
Definition: MathStructure.h:148
ExpressionItem::setTitle
virtual void setTitle(std::string title_)
VariableSubtype
VariableSubtype
Type of variable.
Definition: Variable.h:64
ExpressionItem::subtype
virtual int subtype() const =0
ParseOptions::limit_implicit_multiplication
bool limit_implicit_multiplication
When implicit multiplication is limited variables, functions and units must be separated by a space,...
Definition: includes.h:640
DataPropertyArgument::print
std::string print() const
Calculator::resetVariables
void resetVariables()
ExpressionItem::setCategory
virtual void setCategory(std::string cat_)
DataObjectArgument::print
std::string print() const
Calculator::hasUnit
bool hasUnit(Unit *u)
AngleArgument
Definition: Function.h:713
StructuringMode
StructuringMode
Definition: includes.h:548
Thread
Definition: util.h:109
Calculator::variableNameIsValid
bool variableNameIsValid(const std::string &name_)
PrintOptions::use_max_decimals
bool use_max_decimals
Enable use of max_decimals. False is equivalent to a negative max_decimals value. Default: true.
Definition: includes.h:465
PlotSmoothing
PlotSmoothing
Smoothing a plotted lines.
Definition: includes.h:246
EvaluationOptions::parse_options
ParseOptions parse_options
Options for parsing of expression. Default: default_parse_options.
Definition: includes.h:711
Calculator::printingAbortedMessage
std::string printingAbortedMessage(void) const
Deprecated: use abortedMessage()
Variable.h
MatrixArgument
A matrix argument.
Definition: Function.h:618
QalculateDateTime
Definition: QalculateDateTime.h:18
ArgumentSet::subtest
virtual bool subtest(MathStructure &value, const EvaluationOptions &eo) const
DataObject::parentSet
DataSet * parentSet() const
SymbolicArgument::type
virtual int type() const
Variable::subtype
virtual int subtype() const
Definition: Variable.h:140
util.h
MathStructure::isRationalPolynomial
bool isRationalPolynomial(bool allow_non_rational_coefficient=false, bool allow_interval_coefficient=false) const
UserFunction::calculate
int calculate(MathStructure &mstruct, const MathStructure &vargs, const EvaluationOptions &eo)
Calculator::hasGnomeVFS
bool hasGnomeVFS()
Deprecated: gvfs is not needed anymore.
Calculator::getComma
const std::string & getComma() const
Calculator::prefixNameChanged
void prefixNameChanged(Prefix *p, bool new_item=false)
ExpressionItem::setName
virtual void setName(const ExpressionName &ename, size_t index=1, bool force=true)
DataSet::subtype
int subtype() const
Argument::Argument
Argument(std::string name_="", bool does_test=true, bool does_error=true)
DataObjectArgument::subtest
virtual bool subtest(MathStructure &value, const EvaluationOptions &eo) const
SymbolicArgument
A symbolic argument.
Definition: Function.h:527
PrintOptions::use_unicode_signs
bool use_unicode_signs
If unicode signs can be displayed. Default: false.
Definition: includes.h:447
Calculator::getPrecision
int getPrecision() const
UnknownVariable::isKnown
bool isKnown() const
Definition: Variable.h:206
Calculator::calculateRPNBitwiseNot
bool calculateRPNBitwiseNot(int msecs, const EvaluationOptions &eo=default_user_evaluation_options, MathStructure *parsed_struct=NULL)
IntervalCalculation
IntervalCalculation
Definition: includes.h:613
Calculator::setIgnoreLocale
void setIgnoreLocale()
Deprecated: use pass true to constructor instead.
DynamicVariable::calculatedPrecision
int calculatedPrecision() const
Calculator::setExchangeRatesUsed
void setExchangeRatesUsed(int index)
For internal use, called by currency units.
DataSet.h
TodayVariable
Definition: Variable.h:439
IntegerArgument::set
virtual void set(const Argument *arg)
PlotParameters::x_label
std::string x_label
X-axis label.
Definition: Calculator.h:80
Calculator::setExchangeRatesWarningEnabled
void setExchangeRatesWarningEnabled(bool enable)
Enable or disable old exchange rates warning (initial state is true).
Number::add
bool add(const Number &o)
Argument::subprintlong
virtual std::string subprintlong() const
VectorArgument::copy
virtual Argument * copy() const
ASSUMPTION_SIGN_POSITIVE
@ ASSUMPTION_SIGN_POSITIVE
x > 0
Definition: Variable.h:52
PrintOptions::exp_to_root
bool exp_to_root
Transform exponentiation positive base and unit fraction exponent (if denominator < 10) to root funct...
Definition: includes.h:497
MathFunction::maxargs
int maxargs() const
ArgumentSet
A set of accepted arguments.
Definition: Function.h:766
Unit::type
virtual int type() const
EvaluationOptions::reduce_divisions
bool reduce_divisions
If non-numerical parts of a fraction will be reduced (ex. (5x)/(3xy) =5/(3y) . Default: true.
Definition: includes.h:691
SUBTYPE_BASE_UNIT
@ SUBTYPE_BASE_UNIT
class Unit
Definition: Unit.h:20
UserFunction::internalFormula
std::string internalFormula() const
PrintOptions::use_reference_names
bool use_reference_names
Prefer reference names of variables, units, functions etc. Default: false.
Definition: includes.h:425
MathStructure::setVector
void setVector(const MathStructure *o,...)
ParseOptions::default_dataset
DataSet * default_dataset
Default dataset. Used for object.property syntax without a preceeding data set. Default: NULL.
Definition: includes.h:656
DynamicVariable::get
const MathStructure & get()
ArgumentSet::print
virtual std::string print() const
EvaluationOptions::warn_about_denominators_assumed_nonzero
bool warn_about_denominators_assumed_nonzero
Warn if a denominator with unknown value was assumed non-zero (with assume_denominators_nonzero set t...
Definition: includes.h:699
Calculator::getRadUnit
Unit * getRadUnit()
Argument::subtest
virtual bool subtest(MathStructure &value, const EvaluationOptions &eo) const
PlotParameters::y_max
float y_max
Maximum y-axis value.
Definition: Calculator.h:102
PrintOptions::base
int base
Number base for displaying numbers. Default: 10.
Definition: includes.h:409
ArgumentType
ArgumentType
Argument types.
Definition: Function.h:22
AngleArgument::parse
virtual void parse(MathStructure *mstruct, const std::string &str, const ParseOptions &po=default_parse_options) const
Number::divide
bool divide(const Number &o)
ExpressionName::avoid_input
bool avoid_input
If the name is unsuitable for user input.
Definition: ExpressionItem.h:35
DataObject::setUserModified
void setUserModified(bool user_modified=true)
MathFunction::lastArgumentDefinitionIndex
size_t lastArgumentDefinitionIndex() const
ParseOptions::parsing_mode
ParsingMode parsing_mode
Parsing mode. Default: PARSING_MODE_ADAPTIVE.
Definition: includes.h:658