libqalculate-3.5.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 | UFV_LENGTHS 20

## Typedefs
typedef vector< Prefix * > | p_type

## Enumerations
enum | MessageType { MESSAGE_INFORMATION, MESSAGE_WARNING, MESSAGE_ERROR }
| Message types.
enum | { ELEMENT_CLASS_NOT_DEFINED, ALKALI_METALS, ALKALI_EARTH_METALS, LANTHANIDES, ACTINIDES, TRANSITION_METALS, METALS, METALLOIDS, NONMETALS, HALOGENS, NOBLE_GASES, TRANSACTINIDES }

FunctionArgument::copy
virtual Argument * copy() const
VariableArgument::type
virtual int type() const
Argument::setCustomCondition
void setCustomCondition(string condition)
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
ExpressionItem::title
virtual const 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
PlotParameters::font
string font
Font used for text.
Definition: Calculator.h:86
Number::intValue
int intValue(bool *overflow=NULL) const
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
class CompositeUnit
Definition: Unit.h:24
Prefix::longName
const string & longName(bool return_short_if_no_long=true, bool use_unicode=false) const
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:566
EvaluationOptions::keep_prefixes
bool keep_prefixes
If unit prefixes in original expression will be kept. Default: false.
Definition: includes.h:664
Argument::name
string name() 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:635
Argument::alerts
bool alerts() const
DataObject::getPropertyInputString
string getPropertyInputString(DataProperty *property)
DataObject::getNonlocalizedKeyProperty
const string & getNonlocalizedKeyProperty(DataProperty *property)
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
class KnownVariable
Definition: Variable.h:68
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:348
ASSUMPTION_SIGN_NEGATIVE
x < 0
Definition: Variable.h:54
DataObject::setNonlocalizedKeyProperty
void setNonlocalizedKeyProperty(DataProperty *property, string s_value)
Calculator::printingAbortedMessage
string printingAbortedMessage(void) const
Deprecated: use abortedMessage()
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
Prefix.h
SymbolicArgument::print
virtual string print() const
ExpressionItem::isApproximate
virtual bool isApproximate() const
EvaluationOptions::approximation
ApproximationMode approximation
How exact the result must be. Default: TRY_EXACT.
Definition: includes.h:658
Calculator::getOptimalBinaryPrefix
BinaryPrefix * getOptimalBinaryPrefix(int exp2, int exp=1) const
ParseOptions::base
int base
Base of parsed numbers. Default: 10.
Definition: includes.h:622
DataPropertyArgument::subprintlong
virtual string subprintlong() const
VectorArgument::type
virtual int type() const
Prefix::unicodeName
const string & unicodeName(bool return_short_if_no_uni=true) const
PrintOptions::min_decimals
int min_decimals
Minimum number of decimals to display for numbers. Default: 0.
Definition: includes.h:449
ExpressionItemArgument::subtest
virtual bool subtest(MathStructure &value, const EvaluationOptions &eo) const
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:656
Calculator::unlocalizeExpression
string unlocalizeExpression(string str, const ParseOptions &po=default_parse_options) const
Prefix::value
virtual Number value() const =0
MathStructure::operator[]
MathStructure & operator[](size_t index)
NumberArgument::subprintlong
virtual string subprintlong() const
Calculator.h
Argument::parse
virtual MathStructure parse(const string &str, const ParseOptions &po=default_parse_options) const
TextArgument::type
virtual int type() const
Number::zeta
bool zeta()
UserFunction::formula
string formula() const
Calculator::resetUnits
void resetUnits()
Calculator::hasFunction
bool hasFunction(MathFunction *f)
DateArgument::subprintlong
virtual string subprintlong() const
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:660
KnownVariable::isKnown
bool isKnown() const
Definition: Variable.h:288
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:411
EvaluationOptions::local_currency_conversion
bool local_currency_conversion
Convert to local currency when optimal conversion is enabled.
Definition: includes.h:708
Calculator
The almighty calculator class.
Definition: Calculator.h:214
DataObject::setProperty
void setProperty(DataProperty *property, string s_value, int is_approximate=-1)
ExpressionName::completion_only
bool completion_only
Use only for completion (useful for unicode letter alternatives)
Definition: ExpressionItem.h:39
Argument::Argument
Argument(string name_="", bool does_test=true, bool does_error=true)
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:407
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
Ignores uncertainties and uses the middle value of intervals.
Definition: includes.h:602
BooleanArgument::print
virtual string print() const
UnitArgument
Definition: Function.h:695
AliasUnit_Composite::print
virtual 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::preserve_format
bool preserve_format
Preserves the format of the structure (no sorting, no changed prefixes, no improved division multipli...
Definition: includes.h:477
FRACTION_COMBINED
Display as an integer and a fraction (ex. 3 + 1/2)
Definition: includes.h:338
ExpressionItem::type
virtual int type() const =0
SortOptions::prefix_currencies
bool prefix_currencies
Put currency units before quantity. Default: true.
Definition: includes.h:344
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
Multiplication is NOT commutative; do not use.
Definition: Variable.h:35
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:451
EvaluationOptions::allow_complex
bool allow_complex
If complex numbers will be used for evaluation. Default: true.
Definition: includes.h:680
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
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::setDescription
virtual void setDescription(string descr_)
VectorArgument::print
virtual string print() const
ArgumentSet::type
virtual int type() const
DataPropertyArgument::type
int type() const
ExpressionItem::isActive
virtual bool isActive() const
Calculator::separateToExpression
bool separateToExpression(string &str, string &to_str, const EvaluationOptions &eo, bool keep_modifiers=false, bool allow_empty_from=false) const
Variable::representsPositive
virtual bool representsPositive(bool=false)
Definition: Variable.h:146
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:591
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:658
PlotParameters::title
string title
Title label.
Definition: Calculator.h:76
ExpressionItemType
ExpressionItemType
Type of ExpressionItem.
Definition: includes.h:75
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:692
DecimalPrefix::type
int type() const
ExpressionItem::setRegistered
void setRegistered(bool is_registered)
For internal use.
Calculator::unsetLocale
void unsetLocale()
DateArgument::print
virtual string print() const
CompositeUnit::clear
virtual void clear()
EvaluationOptions::complex_number_form
ComplexNumberForm complex_number_form
Complex number form. Default: COMPLEX_NUMBER_FORM_RECTANGULAR.
Definition: includes.h:706
Argument::getCustomCondition
string getCustomCondition() const
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:491
KnownVariable::expression
virtual string expression() const
IntegerArgument::print
virtual string print() const
Argument::test
bool test(MathStructure &value, int index, MathFunction *f, const EvaluationOptions &eo=default_evaluation_options) const
MathFunction::setArgumentDefinition
void setArgumentDefinition(size_t index, Argument *argdef)
DataObject::getProperty
const string & getProperty(DataProperty *property, int *is_approximate=NULL)
NumberArgument::set
virtual void set(const Argument *arg)
includes.h
Calculator::saveState
void saveState()
Deprecated: does nothing.
Calculator::separateWhereExpression
bool separateWhereExpression(string &str, string &where_str, const EvaluationOptions &eo) const
Split an expression string after and before " where ".
UnknownVariable
A variable with unknown value.
Definition: Variable.h:171
ExpressionItem::getName
virtual const ExpressionName & getName(size_t index) const
PlotLegendPlacement
PlotLegendPlacement
Placement of legend.
Definition: includes.h:227
DecimalPrefix::value
Number value() const
Number::negate
bool negate()
SUBTYPE_UNKNOWN_VARIABLE
class UnknownVariable
Definition: Variable.h:66
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:342
ParseOptions
Options for parsing expressions.
Definition: includes.h:610
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:117
ArgumentSet::print
virtual string print() const
MathStructure.h
SUBTYPE_ALIAS_UNIT
class AliasUnit
Definition: Unit.h:22
Calculator::printMathStructureTimeOut
string printMathStructureTimeOut(const MathStructure &mstruct, int milliseconds=100000, const PrintOptions &op=default_print_options)
Deprecated: use print() instead.
PrintOptions::division_sign
DivisionSign division_sign
Sign used for display of division. Default: DIVISION_SIGN_DIVISION_SLASH.
Definition: includes.h:441
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:633
Unit::isParentOf
virtual bool isParentOf(Unit *u) const
TextArgument
A text argument.
Definition: Function.h:545
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:485
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:684
FunctionArgument::type
virtual int type() const
PrintOptions::digit_grouping
DigitGrouping digit_grouping
Digit grouping separator. Default: DIGIT_GROUPING_NONE.
Definition: includes.h:493
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:525
Calculator::stopControl
void stopControl(void)
ParseOptions::preserve_format
bool preserve_format
Preserve the expression structure as much as possible. Default: false.
Definition: includes.h:641
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:479
UserFunction::internalFormula
string internalFormula() 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:413
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:459
PrintOptions::excessive_parenthesis
bool excessive_parenthesis
Use parentheses even when not necessary. Default: false.
Definition: includes.h:445
EvaluationOptions::do_polynomial_division
bool do_polynomial_division
Use polynomial division to simplify the result. Default: true.
Definition: includes.h:702
Calculator::getOptimalDecimalPrefix
DecimalPrefix * getOptimalDecimalPrefix(int exp10, int exp=1, bool all_prefixes=true) const
STRUCTURING_EXPAND
Simplify the result as much as possible and expand (minimal factorization, normally the same as STRUC...
Definition: includes.h:542
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:690
NowVariable
Definition: Variable.h:458
Calculator::calculate
bool calculate(MathStructure *mstruct, string str, int msecs, const EvaluationOptions &eo=default_user_evaluation_options, MathStructure *parsed_struct=NULL, MathStructure *to_struct=NULL, bool make_to_division=true)
Calculator::loadGlobalCurrencies
bool loadGlobalCurrencies()
Calculator::addBuiltinFunctions
void addBuiltinFunctions()
Number.h
PlotParameters::legend_placement
PlotLegendPlacement legend_placement
Where the plot legend shall be placed. Default: PLOT_LEGEND_TOP_RIGHT.
Definition: Calculator.h:120
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
VectorArgument::subprintlong
virtual string subprintlong() const
MathFunction::printCondition
string printCondition()
BooleanArgument::subprintlong
virtual string subprintlong() const
IntegerArgument
A definition for integer arguments.
Definition: Function.h:487
ParseOptions::hexadecimal_twos_complement
bool hexadecimal_twos_complement
Negative hexadecimal numbers uses two's complement representation. All hexadecimal numbers starting w...
Definition: includes.h:649
UnknownVariable::setAssumptions
void setAssumptions(Assumptions *ass)
ParseOptions::rpn
bool rpn
If Reverse Polish Notation syntax will be used. Default: false.
Definition: includes.h:620
BinaryPrefix::setExponent
void setExponent(int iexp)
Calculator::getExchangeRatesFileName
string getExchangeRatesFileName(int index=1)
FileArgument
Definition: Function.h:744
DataObject::getPropertyStruct
const MathStructure * getPropertyStruct(DataProperty *property)
FileArgument::copy
virtual Argument * copy() const
AssumptionType
AssumptionType
Type assumption.
Definition: Variable.h:33
DataObject::DataObject
DataObject(DataSet *parent_set)
CompositeUnit
A unit consisting of a number of other units.
Definition: Unit.h:275
PrintOptions::hexadecimal_twos_complement
bool hexadecimal_twos_complement
Negative hexadecimal numbers uses two's complement representation. All hexadecimal numbers starting w...
Definition: includes.h:503
PrintOptions::use_unit_prefixes
bool use_unit_prefixes
Use prefixes for units when appropriate. Default: true.
Definition: includes.h:419
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:403
VariableArgument::copy
virtual Argument * copy() const
KnownVariable
A variable with a known value.
Definition: Variable.h:242
PrintOptions::binary_bits
unsigned int binary_bits
Number of bits used for binary numbers. Set to 0 for automatic. Default: 0.
Definition: includes.h:505
Unit::subtype
virtual int subtype() const
Calculator::stillHasUnit
bool stillHasUnit(Unit *u)
PrintOptions::prefix
Prefix * prefix
Force use of a specific prefix for units if not NULL. Default: NULL.
Definition: includes.h:461
DecimalPrefix::setExponent
void setExponent(int iexp)
MathFunction::type
virtual int type() const
VectorArgument
A vector argument.
Definition: Function.h:587
APPROXIMATION_EXACT
Allow only exact results.
Definition: includes.h:527
Calculator::hasGVFS
bool hasGVFS()
Deprecated: gvfs is not needed anymore.
DateArgument::subtest
virtual bool subtest(MathStructure &value, const EvaluationOptions &eo) const
SUBTYPE_VARIABLE
class Variable
Definition: Variable.h:64
ExpressionName::ExpressionName
ExpressionName()
NumberFractionFormat
NumberFractionFormat
Definition: includes.h:330
STRUCTURING_FACTORIZE
Factorize the result.
Definition: includes.h:544
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:427
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:639
Number::catalan
void catalan()
Calculator::useIntervalArithmetic
void useIntervalArithmetic(bool use_interval_arithmetic=true)
MathFunction::condition
string condition() const
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:435
MathFunction
Abstract base class for mathematical functions.
Definition: Function.h:70
DataObject::eraseProperty
void eraseProperty(DataProperty *property)
ASSUMPTION_SIGN_NONPOSITIVE
x <= 0
Definition: Variable.h:56
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:704
PlotParameters::y_min
float y_min
Minimum y-axis value.
Definition: Calculator.h:98
TextArgument::print
virtual string print() const
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:473
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:396
AliasUnit::isParentOf
virtual bool isParentOf(Unit *u) const
PlotDataParameters::style
PlotStyle style
Plot style.
Definition: Calculator.h:131
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:481
Unit::setAsSIUnit
void setAsSIUnit()
Calculator::setPrecision
void setPrecision(int precision=DEFAULT_PRECISION)
PARSING_MODE_ADAPTIVE
The default adaptive mode works as the "parse implicit multiplication first" mode,...
Definition: includes.h:593
VariableArgument::print
virtual string print() const
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:417
SortOptions::minus_last
bool minus_last
If true, avoid placing negative terms first. Default: true.
Definition: includes.h:346
EvaluationOptions::interval_calculation
IntervalCalculation interval_calculation
Algorithm used for calculation of uncertainty propagation / intervals. This does not affect calculati...
Definition: includes.h:712
DataPropertyArgument::print
string print() const
Prefix::setLongName
void setLongName(string long_name)
ExpressionItem.h
Calculator::print
string print(const MathStructure &mstruct, int milliseconds=100000, const PrintOptions &op=default_print_options)
AngleArgument::subtest
virtual bool subtest(MathStructure &value, const EvaluationOptions &eo) const
EvaluationOptions::calculate_variables
bool calculate_variables
If known variables will be replaced by their value. Default: true.
Definition: includes.h:666
ExpressionItem::clearNonReferenceNames
virtual void clearNonReferenceNames()
NumberArgument
A definition for numerical arguments.
Definition: Function.h:442
EvaluationOptions::test_comparisons
int test_comparisons
If comparisons will be evaluated (ex. 5>2 => 1). Default: true.
Definition: includes.h:670
PrintOptions::comma_sign
string comma_sign
Comma sign or empty string to use default comma sign. Default: empty string.
Definition: includes.h:467
CompositeUnit::print
virtual 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
ExpressionItem::hasName
virtual size_t hasName(const string &sname, bool case_sensitive=true) const
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:429
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:405
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
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:662
FunctionArgument::subtest
virtual bool subtest(MathStructure &value, const EvaluationOptions &eo) const
POST_CONVERSION_BASE
Convert to base units.
Definition: includes.h:555
PrintOptions::limit_implicit_multiplication
bool limit_implicit_multiplication
Use a format compatible with ParseOptions::limit_implicit_multiplication. Default: false.
Definition: includes.h:433
AliasUnit
An unit with relation to another unit.
Definition: Unit.h:172
Calculator::addPrefix
Prefix * addPrefix(Prefix *p)
STRUCTURING_HYBRID
Deprecated: use STRUCTURING_SIMPLIFY instead.
Definition: includes.h:546
PrintOptions::multiplication_sign
MultiplicationSign multiplication_sign
Sign used for display of multiplication. Default: MULTIPLICATION_SIGN_DOT.
Definition: includes.h:439
PARSING_MODE_IMPLICIT_MULTIPLICATION_FIRST
In the "parse implicit multiplication first" mode, implicit multiplication is parsed before explicit ...
Definition: includes.h:595
Unit::setUseWithPrefixesByDefault
void setUseWithPrefixesByDefault(bool use_with_prefixes)
DataPropertyArgument::copy
Argument * copy() const
MathFunction::getArgumentDefinition
Argument * getArgumentDefinition(size_t index)
STRUCTURING_NONE
Do not do any factorization or additional simplifications.
Definition: includes.h:540
AngleArgument::type
virtual int type() const
NumberPrefix
A prefix with a free numerical value.
Definition: Prefix.h:195
Calculator::useDecimalPoint
void useDecimalPoint(bool comma_as_separator=false)
Calculator::localizeExpression
string localizeExpression(string str, const ParseOptions &po=default_parse_options) const
Argument::~Argument
virtual ~Argument()
ParseOptions::unknowns_enabled
bool unknowns_enabled
If left-over characters will be parsed as symbols. Default: true.
Definition: includes.h:616
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:275
APPROXIMATION_APPROXIMATE
Calculate the result approximately directly.
Definition: includes.h:531
Calculator::usesBinaryPrefixes
int usesBinaryPrefixes() const
Prefix::Prefix
Prefix(string long_name, string short_name="", string unicode_name="")
DataObjectArgument::type
int type() const
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:409
ParseOptions::twos_complement
bool twos_complement
Negative binary numbers uses two's complement representation. All binary numbers starting with 1 are ...
Definition: includes.h:647
Unit::setSystem
void setSystem(string s_system)
TomorrowVariable
Definition: Variable.h:430
MathStructure::childUpdated
void childUpdated(size_t index, bool recursive=false)
UserFunction::subtype
int subtype() const
TodayVariable::representsPositive
virtual bool representsPositive(bool=false)
Definition: Variable.h:423
CompositeUnit::generateMathStructure
virtual MathStructure generateMathStructure(bool make_division=false, bool set_null_prefixes=false) const
VariableArgument
Definition: Function.h:728
Calculator::printingAborted
bool printingAborted(void)
Deprecated: use aborted()
Number
A number.
Definition: Number.h:48
ASSUMPTION_SIGN_UNKNOWN
x = ?
Definition: Variable.h:48
Calculator::terminateThreads
void terminateThreads()
YesterdayVariable
Definition: Variable.h:444
INTERVAL_CALCULATION_SIMPLE_INTERVAL_ARITHMETIC
Treats all intervals as uncorrelated.
Definition: includes.h:606
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
In the conventional mode implicit multiplication does not differ from explicit multiplication (<quote...
Definition: includes.h:597
TomorrowVariable::representsPositive
virtual bool representsPositive(bool=false)
Definition: Variable.h:437
DataProperty::DataProperty
DataProperty(DataSet *parent_set, string s_name="", string s_title="", string s_description="")
Unit::useWithPrefixesByDefault
bool useWithPrefixesByDefault() const
FileArgument::print
virtual string print() const
Calculator::setDefaultAssumptions
void setDefaultAssumptions(Assumptions *ass)
Calculator::reset
void reset()
MathOperation
MathOperation
Mathematical operations.
Definition: includes.h:271
PrintOptions::short_multiplication
bool short_multiplication
Avoid using multiplication sign, when appropriate. Default: true.
Definition: includes.h:431
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:672
PrintOptions::sort_options
SortOptions sort_options
Options for the order of values in the displayed expression. Default: default_sort_options.
Definition: includes.h:465
CompositeUnit::get
virtual Unit * get(size_t index, int *exp=NULL, Prefix **prefix=NULL) const
TYPE_UNIT
class Unit
Definition: includes.h:81
PrintOptions::preserve_precision
bool preserve_precision
Use the internal precision of each number instead of global precision. Default: false.
Definition: includes.h:489
PrintOptions::use_all_prefixes
bool use_all_prefixes
Use prefixes for all units (even imperial and similar ones). Default: false.
Definition: includes.h:425
DataObject::isUserModified
bool isUserModified() const
Variable::type
virtual int type() const
Definition: Variable.h:132
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:405
AliasUnit::setInverseExpression
virtual void setInverseExpression(string inverse)
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
PrintOptions::decimalpoint_sign
string decimalpoint_sign
Decimal sign or empty string to use default decimal sign. Default: empty string.
Definition: includes.h:469
KnownVariable::isExpression
virtual bool isExpression() const
UnitArgument::subprintlong
virtual string subprintlong() const
Number::Number
Number()
ExpressionItem::description
virtual const string & description() const
TYPE_FUNCTION
class MathFunction
Definition: includes.h:79
SymbolicArgument::subprintlong
virtual string subprintlong() const
Calculator::convert
MathStructure convert(const MathStructure &mstruct, string composite_, const EvaluationOptions &eo=default_user_evaluation_options, MathStructure *units=NULL)
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
Used internally.
Definition: includes.h:533
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:46
Number::setApproximate
void setApproximate(bool is_approximate=true)
Argument::tests
bool tests() 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:501
TYPE_VARIABLE
class Variable
Definition: includes.h:77
PlotStyle
PlotStyle
Plot type/style.
Definition: includes.h:238
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
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
im(x) != 0
Definition: Variable.h:39
Number::exp10
bool exp10()
Unit::print
virtual 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
BooleanArgument
A boolean argument.
Definition: Function.h:678
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
Do not do any conversion of units in addition to syncing.
Definition: includes.h:551
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
Calculator::getDecimalPoint
const string & getDecimalPoint() const
MatrixArgument::type
virtual int type() const
UnitArgument::subtest
virtual bool subtest(MathStructure &value, const EvaluationOptions &eo) const
ArgumentSet::subprintlong
virtual string subprintlong() 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:421
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()
EvaluationOptions::expand
int expand
If factors (and bases) containing addition will be expanded (ex. z(x+y)=zx+zy). Default: true.
Definition: includes.h:674
Calculator::convertTimeOut
MathStructure convertTimeOut(string str, Unit *from_unit, Unit *to_unit, int milliseconds, const EvaluationOptions &eo=default_user_evaluation_options)
NumberArgument::subtest
virtual bool subtest(MathStructure &value, const EvaluationOptions &eo) const
UnknownVariable::subtype
virtual int subtype() const
Definition: Variable.h:218
MatrixArgument::print
virtual string print() const
PrefixType
PrefixType
Types for prefix classes.
Definition: Prefix.h:22
BinaryPrefix::value
Number value() const
DecimalPrefix::DecimalPrefix
DecimalPrefix(int exp10, string long_name, string short_name="", string unicode_name="")
ParseOptions::variables_enabled
bool variables_enabled
If variables will be parsed. Default: true.
Definition: includes.h:612
UnitSubtype
UnitSubtype
Type of unit.
Definition: Unit.h:18
ExpressionName::name
string name
The name.
Definition: ExpressionItem.h:41
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:499
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
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)
FileArgument::subprintlong
virtual string subprintlong() 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:457
PrintOptions::spacious
bool spacious
If space will be used to make the output look nicer. Default: true.
Definition: includes.h:443
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:688
AutoPostConversion
AutoPostConversion
Definition: includes.h:549
EvaluationOptions::calculate_functions
bool calculate_functions
If functions will be calculated. Default: true.
Definition: includes.h:668
Calculator::startControl
void startControl(int milliseconds=0)
Assumptions
An assumption about an unknown mathematical value.
Definition: Variable.h:76
Calculator::parseAddId
size_t parseAddId(MathFunction *f, const string &str, const ParseOptions &po, bool persistent=false)
MathStructure::setType
void setType(StructureType mtype)
Argument::print
virtual string print() const
Calculator::calculateAndPrint
string calculateAndPrint(string str, int msecs=10000, const EvaluationOptions &eo=default_user_evaluation_options, const PrintOptions &po=default_print_options)
Argument::rationalPolynomial
bool rationalPolynomial() const
Number::isApproximate
bool isApproximate() const
BinaryPrefix::type
int type() const
PlotDataParameters::title
string title
Title label.
Definition: Calculator.h:127
DataSet::calculate
virtual int calculate(MathStructure &mstruct, const MathStructure &vargs, const EvaluationOptions &eo)
ExpressionItem::hasNameCaseSensitive
virtual size_t hasNameCaseSensitive(const string &sname) const
Calculator::loadGlobalVariables
bool loadGlobalVariables()
DataPropertyArgument::subtest
virtual bool subtest(MathStructure &value, const EvaluationOptions &eo) const
UserFunction
A user defined mathematical function.
Definition: Function.h:231
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:423
Argument::copy
virtual Argument * copy() const
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::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:162
Number::exp2
bool exp2()
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:557
DataObjectArgument::subprintlong
virtual string subprintlong() const
UnitArgument::copy
virtual Argument * copy() const
Calculator::printingControlled
bool printingControlled(void) const
Deprecated: use isControlled()
UserFunction::setFormula
void setFormula(string new_formula, int argc_=-1, int max_argc_=0)
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:483
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:453
ExpressionItemArgument::type
virtual int type() const
UnknownVariable::assumptions
Assumptions * assumptions()
AngleArgument::print
virtual string print() const
ParseOptions::functions_enabled
bool functions_enabled
If functions will be parsed. Default: true.
Definition: includes.h:614
Variable
Abstract base class for variables.
Definition: Variable.h:122
SymbolicArgument::subtest
virtual bool subtest(MathStructure &value, const EvaluationOptions &eo) const
PlotParameters::y_label
string y_label
Y-axis label.
Definition: Calculator.h:78
NowVariable::representsPositive
virtual bool representsPositive(bool=false)
Definition: Variable.h:465
VariableArgument::subprintlong
virtual string subprintlong() const
DataObject::getPropertyDisplayString
string getPropertyDisplayString(DataProperty *property)
POST_CONVERSION_OPTIMAL_SI
Convert to the least amount of units. Non-SI units are converted to SI units.
Definition: includes.h:553
AngleArgument::copy
virtual Argument * copy() const
InternalPrintStruct
Definition: includes.h:514
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:631
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:211
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:710
CompositeUnit::containsRelativeTo
virtual bool containsRelativeTo(Unit *u) const
Calculator::findMatchingUnit
Unit * findMatchingUnit(const MathStructure &mstruct)
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:629
KnownVariable::subtype
int subtype() const
Definition: Variable.h:302
ExpressionName
A name for an expression item (function, variable or unit)
Definition: ExpressionItem.h:22
Prefix::setUnicodeName
void setUnicodeName(string unicode_name)
Argument::printlong
string printlong() const
FRACTION_FRACTIONAL
Display as fraction (ex. 4/3)
Definition: includes.h:336
ExpressionItem::hasChanged
virtual bool hasChanged() const
Prefix::shortName
const string & shortName(bool return_long_if_no_short=true, bool use_unicode=false) const
ArgumentSet::copy
virtual Argument * copy() const
NumberPrefix::NumberPrefix
NumberPrefix(const Number &nr, string long_name, string short_name="", string unicode_name="")
KnownVariable::representsPositive
virtual bool representsPositive(bool=false)
Number::realPart
Number realPart() const
Element
Definition: Calculator.h:194
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:694
IntegerArgument::subprintlong
virtual string subprintlong() const
APPROXIMATION_TRY_EXACT
Try to make the result as exact as possible.
Definition: includes.h:529
PlotDataParameters::xaxis2
bool xaxis2
Use scale on second x-axis.
Definition: Calculator.h:135
AngleArgument::subprintlong
virtual string subprintlong() const
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:676
Variable::isKnown
virtual bool isKnown() const =0
Calculator::localToString
string localToString(bool include_spaces=true) const
AngleArgument::parse
virtual void parse(MathStructure *mstruct, const string &str, const ParseOptions &po=default_parse_options) const
EvaluationOptions::structuring
StructuringMode structuring
If the evaluation result will be expanded or factorized Default: STRUCTURING_NONE.
Definition: includes.h:696
MatrixArgument::subprintlong
virtual string subprintlong() const
ExpressionItem
Abstract base class for functions, variables and units.
Definition: ExpressionItem.h:82
PlotParameters::filename
string filename
Image to save plot to. If empty shows plot in a window on the screen.
Definition: Calculator.h:82
Calculator::getExchangeRatesTime
time_t getExchangeRatesTime(int index=-1)
BinaryPrefix
A binary prefix.
Definition: Prefix.h:156
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:497
FunctionArgument::subprintlong
virtual string subprintlong() const
FRACTION_DECIMAL
Display numbers in decimal, not fractional, format (ex. 0.333333)
Definition: includes.h:332
UserFunction::setSubfunction
void setSubfunction(size_t index, string subfunction)
Function.h
Calculator::getExchangeRatesUrl
string getExchangeRatesUrl(int index=1)
MathFunction::args
int args() const
Number::square
bool square()
DataProperty
A data set property.
Definition: DataSet.h:122
Calculator::variableNameIsValid
bool variableNameIsValid(const string &name_)
KnownVariable::get
virtual const MathStructure & get()
Prefix
Abstract class for prefixes.
Definition: Prefix.h:33
Number::isMinusInfinity
bool isMinusInfinity(bool ignore_imag=false) const
Prefix::setShortName
void setShortName(string short_name)
UnitArgument::print
virtual string print() const
NumberArgument::type
virtual int type() const
DataObjectArgument::print
string print() const
Calculator::stillHasFunction
bool stillHasFunction(MathFunction *f)
ExpressionItemArgument
Argument for functions, variables and units.
Definition: Function.h:639
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
ExpressionItem::setTitle
virtual void setTitle(string title_)
PrintOptions::base_display
BaseDisplay base_display
How prefixes for numbers in non-decimal bases will be displayed.
Definition: includes.h:401
PrintOptions::max_decimals
int max_decimals
Maximum number of decimals to display for numbers. A negative value disables the limit....
Definition: includes.h:451
Calculator::getExactBinaryPrefix
BinaryPrefix * getExactBinaryPrefix(int exp2, int exp=1) const
BooleanArgument::type
virtual int type() const
Number::isPlusInfinity
bool isPlusInfinity(bool ignore_imag=false) const
ASSUMPTION_SIGN_NONNEGATIVE
x >= 0
Definition: Variable.h:52
MathFunction::minargs
int minargs() const
ComparisonType
ComparisonType
Comparison signs for comparison structures.
Definition: includes.h:293
PlotParameters::linewidth
int linewidth
Width of lines. Default: 2.
Definition: Calculator.h:116
Calculator::fetchExchangeRates
bool fetchExchangeRates(int seconds, string wget_args)
Deprecated: wget arguments are not used.
PlotParameters::x_label
string x_label
X-axis label.
Definition: Calculator.h:80
AliasUnit::setExpression
virtual void setExpression(string relation)
ParseOptions::units_enabled
bool units_enabled
If units will be parsed. Default: true.
Definition: includes.h:618
NumberArgument::print
virtual string print() const
PrintOptions::halfexp_to_sqrt
bool halfexp_to_sqrt
Transform raised to 1/2 to square root function. Default: true.
Definition: includes.h:447
MESSAGE_CATEGORY_NONE
#define MESSAGE_CATEGORY_NONE
Message categories.
Definition: Calculator.h:156
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:682
PrintOptions::date_time_format
DateTimeFormat date_time_format
Format for time and date. Default: DATE_TIME_FORMAT_ISO.
Definition: includes.h:495
ArgumentMinMaxPreDefinition
ArgumentMinMaxPreDefinition
Predefined max and min values for number and integer arguments.
Definition: Function.h:44
FRACTION_DECIMAL_EXACT
Display as fraction if necessary to get an exact display of the result (ex. 1/3, but 0....
Definition: includes.h:334
DateArgument::parse
virtual void parse(MathStructure *mstruct, const string &str, const ParseOptions &po=default_parse_options) const
Calculator::hasVariable
bool hasVariable(Variable *v)
Argument::setName
void setName(string name_)
ParseOptions::angle_unit
AngleUnit angle_unit
Default angle unit for trigonometric functions. Default: ANGLE_UNIT_NONE.
Definition: includes.h:637
ASSUMPTION_SIGN_NONZERO
x != 0
Definition: Variable.h:58
Calculator::canPlot
bool canPlot()
PlotFileType
PlotFileType
File type for saving plot to image.
Definition: includes.h:259
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:700
Calculator::delId
void delId(size_t id)
Calculator::getPrefix
Prefix * getPrefix(size_t index) const
Calculator::getId
MathStructure * getId(size_t id)
MathFunction::setCondition
void setCondition(string expression)
AliasUnit::subtype
virtual int subtype() const
Calculator::getComma
const string & getComma() const
PrintOptions::hide_underscore_spaces
bool hide_underscore_spaces
Replace underscores in names with spaces, unless name has suffix. Default: false.
Definition: includes.h:475
PrintOptions::is_approximate
bool * is_approximate
If not NULL will be set to true if the output is approximate. Default: NULL.
Definition: includes.h:463
ExpressionItemArgument::print
virtual string print() const
DynamicVariable::representsPositive
virtual bool representsPositive(bool=false)
Definition: Variable.h:376
DataSet
A data set.
Definition: DataSet.h:197
MathStructure
A structure representing a mathematical value/expression/result.
Definition: MathStructure.h:143
VariableSubtype
VariableSubtype
Type of variable.
Definition: Variable.h:62
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:627
Calculator::parse
MathStructure parse(string str, const ParseOptions &po=default_parse_options)
Calculator::resetVariables
void resetVariables()
Calculator::hasUnit
bool hasUnit(Unit *u)
AngleArgument
Definition: Function.h:711
StructuringMode
StructuringMode
Definition: includes.h:538
Thread
Definition: util.h:108
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:455
PlotSmoothing
PlotSmoothing
Smoothing a plotted lines.
Definition: includes.h:250
EvaluationOptions::parse_options
ParseOptions parse_options
Options for parsing of expression. Default: default_parse_options.
Definition: includes.h:698
Variable.h
MatrixArgument
A matrix argument.
Definition: Function.h:616
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:137
util.h
BinaryPrefix::BinaryPrefix
BinaryPrefix(int exp2, string long_name, string short_name="", string unicode_name="")
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::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
DataObjectArgument::subtest
virtual bool subtest(MathStructure &value, const EvaluationOptions &eo) const
SymbolicArgument
A symbolic argument.
Definition: Function.h:525
PrintOptions::use_unicode_signs
bool use_unicode_signs
If unicode signs can be displayed. Default: false.
Definition: includes.h:437
Prefix::name
const 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
Calculator::getPrecision
int getPrecision() const
UnknownVariable::isKnown
bool isKnown() const
Definition: Variable.h:201
Calculator::calculateRPNBitwiseNot
bool calculateRPNBitwiseNot(int msecs, const EvaluationOptions &eo=default_user_evaluation_options, MathStructure *parsed_struct=NULL)
IntervalCalculation
IntervalCalculation
Definition: includes.h:600
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:416
IntegerArgument::set
virtual void set(const Argument *arg)
Calculator::setExchangeRatesWarningEnabled
void setExchangeRatesWarningEnabled(bool enable)
Enable or disable old exchange rates warning (initial state is true).
Number::add
bool add(const Number &o)
VectorArgument::copy
virtual Argument * copy() const
TextArgument::subprintlong
virtual string subprintlong() const
ASSUMPTION_SIGN_POSITIVE
x > 0
Definition: Variable.h:50
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:487
MathFunction::maxargs
int maxargs() const
ArgumentSet
A set of accepted arguments.
Definition: Function.h:764
Unit::type
virtual int type() const
ExpressionItem::category
virtual const string & category() 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:678
ExpressionItemArgument::subprintlong
virtual string subprintlong() const
SUBTYPE_BASE_UNIT
class Unit
Definition: Unit.h:20
Calculator::nameTaken
bool nameTaken(string name, ExpressionItem *object=NULL)
PrintOptions::use_reference_names
bool use_reference_names
Prefer reference names of variables, units, functions etc. Default: false.
Definition: includes.h:415
MathStructure::setVector
void setVector(const MathStructure *o,...)
ExpressionItem::setCategory
virtual void setCategory(string cat_)
ParseOptions::default_dataset
DataSet * default_dataset
Default dataset. Used for object.property syntax without a preceeding data set. Default: NULL.
Definition: includes.h:643
DynamicVariable::get
const MathStructure & get()
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:686
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:399
ArgumentType
ArgumentType
Argument types.
Definition: Function.h:22
Argument::subprintlong
virtual string subprintlong() const
FunctionArgument::print
virtual string print() 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)
Unit::system
const string & system() const
MathFunction::lastArgumentDefinitionIndex
size_t lastArgumentDefinitionIndex() const
ParseOptions::parsing_mode
ParsingMode parsing_mode
Parsing mode. Default: PARSING_MODE_ADAPTIVE.
Definition: includes.h:645