• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdeedu API Reference
  • KDE Home
  • Contact Us
 

Analitza

  • Analitza
  • Operator
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
Analitza::Operator Class Reference
Analitza

#include <operator.h>

Inheritance diagram for Analitza::Operator:
Inheritance graph
[legend]

Public Types

enum  OperatorType {
  none =0, plus, times, minus,
  divide, quotient, power, root,
  factorial, _and, _or, _xor,
  _not, gcd, lcm, rem,
  factorof, max, min, lt,
  gt, eq, neq, leq,
  geq, implies, approx, abs,
  floor, ceiling, sin, cos,
  tan, sec, csc, cot,
  sinh, cosh, tanh, sech,
  csch, coth, arcsin, arccos,
  arctan, arccot, arccosh, arccsc,
  arccsch, arcsec, arcsech, arcsinh,
  arctanh, exp, ln, log,
  sum, product, diff, card,
  scalarproduct, selector, _union, forall,
  exists, map, filter, transpose,
  function, nOfOps
}
 
- Public Types inherited from Analitza::Object
enum  ObjectType {
  none =0, value, variable, vector,
  list, apply, oper, container,
  matrix, matrixrow, custom
}
 

Public Member Functions

 Operator (OperatorType t)
 
virtual ~Operator ()
 
virtual QVariant accept (AbstractExpressionVisitor *) const
 
virtual Operator * copy () const
 
virtual bool decorate (const QMap< QString, Object ** > &)
 
Operator inverse () const
 
bool isBounded () const
 
bool isCorrect () const
 
bool isTrigonometric () const
 
virtual bool matches (const Object *, QMap< QString, const Object * > *) const
 
OperatorType multiplicityOperator () const
 
QString name () const
 
int nparams () const
 
bool operator!= (OperatorType o) const
 
bool operator!= (const Operator &o) const
 
Operator operator= (const Operator &a)
 
bool operator== (const Operator &o) const
 
bool operator== (OperatorType o) const
 
OperatorType operatorType () const
 
void setOperator (OperatorType t)
 
- Public Member Functions inherited from Analitza::Object
virtual ~Object ()
 
bool isApply () const
 
bool isContainer () const
 
virtual bool isZero () const
 
QString toString () const
 
enum ObjectType type () const
 

Static Public Member Functions

static OperatorType multiplicityOperator (const OperatorType &t)
 
static OperatorType toOperatorType (const QString &s)
 

Static Public Attributes

static const char words [nOfOps][14]
 

Additional Inherited Members

- Protected Member Functions inherited from Analitza::Object
 Object (enum ObjectType t)
 
- Protected Attributes inherited from Analitza::Object
const ObjectType m_type
 

Detailed Description

Is the operator representation in the trees.

Definition at line 36 of file operator.h.

Member Enumeration Documentation

enum Analitza::Operator::OperatorType

Specifies the type of an operator.

Enumerator
none 
plus 
times 
minus 
divide 
quotient 
power 
root 
factorial 
_and 
_or 
_xor 
_not 
gcd 
lcm 
rem 
factorof 
max 
min 
lt 
gt 
eq 
neq 
leq 
geq 
implies 
approx 
abs 
floor 
ceiling 
sin 
cos 
tan 
sec 
csc 
cot 
sinh 
cosh 
tanh 
sech 
csch 
coth 
arcsin 
arccos 
arctan 
arccot 
arccosh 
arccsc 
arccsch 
arcsec 
arcsech 
arcsinh 
arctanh 
exp 
ln 
log 
sum 
product 
diff 
card 
scalarproduct 
selector 
_union 
forall 
exists 
map 
filter 
transpose 
function 
nOfOps 

Definition at line 40 of file operator.h.

Constructor & Destructor Documentation

Analitza::Operator::Operator ( OperatorType  t)
inlineexplicit

Constructor.

Creates an operator with t type .

Definition at line 70 of file operator.h.

virtual Analitza::Operator::~Operator ( )
inlinevirtual

Destructor.

Definition at line 73 of file operator.h.

Member Function Documentation

virtual QVariant Analitza::Operator::accept ( AbstractExpressionVisitor *  exp) const
virtual

Returns some string depending on the visior.

Implements Analitza::Object.

virtual Operator* Analitza::Operator::copy ( ) const
virtual
Returns
a new and equal instance of the tree.

Implements Analitza::Object.

virtual bool Analitza::Operator::decorate ( const QMap< QString, Object ** > &  )
inlinevirtual

Definition at line 123 of file operator.h.

Operator Analitza::Operator::inverse ( ) const
bool Analitza::Operator::isBounded ( ) const

Returns whether this operator needs bounding.

bool Analitza::Operator::isCorrect ( ) const
inline

Returns whether it is a correct object.

Definition at line 112 of file operator.h.

bool Analitza::Operator::isTrigonometric ( ) const
inline

Returns if it is a trigonometric operator.

Definition at line 106 of file operator.h.

virtual bool Analitza::Operator::matches ( const Object *  exp,
QMap< QString, const Object * > *  found 
) const
virtual

exp is the tree that we will compare to, found is where we will pass the variables store the results.

It will return whether the object follows the pattern structure.

Implements Analitza::Object.

OperatorType Analitza::Operator::multiplicityOperator ( ) const
inline

Returns the multiplicity operator.

e.g. 5+5+5+5=5*4 -> times is the multiplicityOperator of plus.

Definition at line 103 of file operator.h.

static OperatorType Analitza::Operator::multiplicityOperator ( const OperatorType &  t)
static

Returns the multiplicity operator of an operator t.

e.g. 5+5+5+5=5*4 -> times is the multiplicityOperator of plus.

QString Analitza::Operator::name ( ) const

Returns the string expression representation of the operator.

int Analitza::Operator::nparams ( ) const
inline

Returns the number of params expected for the operator type.

Definition at line 79 of file operator.h.

bool Analitza::Operator::operator!= ( OperatorType  o) const
inline

Returns whether o is different to this operator.

Definition at line 94 of file operator.h.

bool Analitza::Operator::operator!= ( const Operator &  o) const
inline

Returns whether o is different to this operator.

Definition at line 97 of file operator.h.

Operator Analitza::Operator::operator= ( const Operator &  a)
inline

Makes this operator equal to a.

Definition at line 100 of file operator.h.

bool Analitza::Operator::operator== ( const Operator &  o) const
inline

Returns whether o is equal to this operator.

Definition at line 88 of file operator.h.

bool Analitza::Operator::operator== ( OperatorType  o) const
inline

Returns whether o is equal to this operator.

Definition at line 91 of file operator.h.

OperatorType Analitza::Operator::operatorType ( ) const
inline

Returns the operator type.

Definition at line 82 of file operator.h.

void Analitza::Operator::setOperator ( OperatorType  t)
inline

Sets an operator type to the object.

Definition at line 76 of file operator.h.

static OperatorType Analitza::Operator::toOperatorType ( const QString &  s)
static

Converts a s operator tag to the operator.

Member Data Documentation

const char Analitza::Operator::words[nOfOps][14]
static

Definition at line 128 of file operator.h.


The documentation for this class was generated from the following file:
  • operator.h
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:11:37 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

Analitza

Skip menu "Analitza"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Modules
  • Related Pages

kdeedu API Reference

Skip menu "kdeedu API Reference"
  • Analitza
  •     lib
  • kalgebra
  • kalzium
  •   libscience
  • kanagram
  • kig
  •   lib
  • klettres
  • marble
  • parley
  • rocs
  •   App
  •   RocsCore
  •   VisualEditor
  •   stepcore

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal