# UnknownVariable Class Reference

A variable with unknown value. More...

`#include <Variable.h>`

Inheritance diagram for UnknownVariable:

List of all members.

## Public Member Functions
| UnknownVariable (string cat_, string name_, string title_="", bool is_local=true, bool is_builtin=false, bool is_active=true)
| UnknownVariable ()
| UnknownVariable (const UnknownVariable *variable)
virtual ExpressionItem * | copy () const
virtual void | set (const ExpressionItem *item)
bool | isKnown () const
void | setAssumptions (Assumptions *ass)
Assumptions * | assumptions ()
int | subtype () const
virtual bool | representsPositive (bool=false)
virtual bool | representsNegative (bool=false)
virtual bool | representsNonNegative (bool=false)
virtual bool | representsNonPositive (bool=false)
virtual bool | representsInteger (bool=false)
virtual bool | representsNumber (bool=false)
virtual bool | representsRational (bool=false)
virtual bool | representsReal (bool=false)
virtual bool | representsComplex (bool=false)
virtual bool | representsNonZero (bool=false)
virtual bool | representsNonMatrix ()
## Protected Attributes
Assumptions * | o_assumption

## Detailed Description

A variable with unknown value.

Unknown variables have an associated assumption object.

## Constructor & Destructor Documentation

UnknownVariable::UnknownVariable | ( | string | cat_,
|  | string | name_,
|  | string | title_ = `""`,
|  | bool | is_local = `true`,
|  | bool | is_builtin = `false`,
|  | bool | is_active = `true` |
| ) |  |  |

Create an unknown.

Parameters:

  | cat_ | Category that the variable belongs to.
  | name_ | Initial name of the variable.
  | title_ | Descriptive name.
  | is_local | If the variable is local/user-defined or global.
  | is_builtin | If the variable is builtin and not modifiable.
  | is_active | If the variable is active and can be used in expressions.

UnknownVariable::UnknownVariable | ( |  | ) |

Create an empty unknown variable.

UnknownVariable::UnknownVariable | ( | const UnknownVariable * | variable | ) |

Create a copy of an unknown variable.

Parameters:

  | variable | Unknown variable to copy.

## Member Function Documentation

bool UnknownVariable::isKnown | ( |  | ) | const`[inline, virtual]`

Returns if the variable has a known value (as oppossed to assumptions).

Returns:
  true if the variable is of class KnownVariable, false if UnknownVariable.

Implements Variable.

void UnknownVariable::setAssumptions | ( | Assumptions * | ass | ) |

Sets the assumptions of the unknown variable.

Parameters:

  | ass | Assumptions.

Assumptions* UnknownVariable::assumptions | ( |  | ) |

Returns the assumptions of the unknown variable.

Returns:
  Assumptions of the unknown variable.

int UnknownVariable::subtype | ( |  | ) | const`[inline, virtual]`

Returns the subtype of the variable, corresponding to which subsubclass the object belongs to.

Returns:
  VariableSubtype.

Reimplemented from Variable.

References SUBTYPE_UNKNOWN_VARIABLE.

virtual bool UnknownVariable::representsPositive | ( | bool | = `false` | ) | `[virtual]`

Returns if the variable represents a positive value.

Reimplemented from Variable.

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

- libqalculate/Variable.h