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

Analitza

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

#include <expressiontype.h>

Public Types

enum  Type {
  Error =0, Value, Vector, List,
  Lambda, Any, Many, Object,
  Char, Bool, Matrix
}
 

Public Member Functions

 ExpressionType (Type t=Error, int any=-1)
 
 ExpressionType (Type t, const ExpressionType &contained, int s=0)
 
 ExpressionType (Type t, const QList< ExpressionType > &alternatives)
 
 ExpressionType (const QString &objectName)
 
 ExpressionType (const ExpressionType &t)
 
 ~ExpressionType ()
 
void addAlternative (const ExpressionType &t)
 
bool addAssumption (const QString &bvar, const ExpressionType &t)
 
void addAssumptions (const QMap< QString, ExpressionType > &a)
 
ExpressionType & addParameter (const ExpressionType &t)
 
QList< ExpressionType > alternatives () const
 
int anyValue () const
 
ExpressionType assumptionFor (const QString &bvar) const
 
QMap< QString, ExpressionType > assumptions () const
 
QMap< QString, ExpressionType > & assumptions ()
 
bool canCompareTo (const ExpressionType &type) const
 
bool canReduceTo (const ExpressionType &type) const
 
void clearAssumptions ()
 
ExpressionType contained () const
 
int increaseStars (int stars)
 
bool isError () const
 
QString objectName () const
 
bool operator!= (const ExpressionType &t) const
 
ExpressionType operator= (const ExpressionType &et)
 
bool operator== (const ExpressionType &t) const
 
QList< ExpressionType > parameters () const
 
QList< ExpressionType > & parameters ()
 
void reduce (const ExpressionType &type)
 
void removeAssumptions (const QStringList &bvarStrings)
 
ExpressionType returnValue () const
 
ExpressionType & simplifyStars ()
 
int size () const
 
ExpressionType starsToType (const QMap< int, ExpressionType > &info) const
 
QString toString () const
 
Type type () const
 

Static Public Member Functions

static bool assumptionsMerge (QMap< QString, ExpressionType > &data, const QMap< QString, ExpressionType > &newmap)
 
static void assumptionsUnion (QMap< QString, ExpressionType > &data, const QMap< QString, ExpressionType > &newmap)
 
static QMap< int, ExpressionType > computeStars (const QMap< int, ExpressionType > &initial, const ExpressionType &candidate, const ExpressionType &type)
 
static QList< ExpressionType > lambdaFromArgs (const QList< ExpressionType > &args)
 
static QList< ExpressionType > manyFromArgs (const QList< ExpressionType > &args)
 
static bool matchAssumptions (QMap< int, ExpressionType > *stars, const QMap< QString, ExpressionType > &assum1, const QMap< QString, ExpressionType > &assum2)
 
static ExpressionType minimumType (const ExpressionType &t1, const ExpressionType &t2)
 
static QStringList wrongAssumptions (const QMap< QString, ExpressionType > &assum1, const QMap< QString, ExpressionType > &assum2)
 

Detailed Description

Definition at line 30 of file expressiontype.h.

Member Enumeration Documentation

enum Analitza::ExpressionType::Type

Just use undefined type when returning from a recursion.

Enumerator
Error 
Value 
Vector 
List 
Lambda 
Any 
Many 
Object 
Char 
Bool 
Matrix 

Definition at line 34 of file expressiontype.h.

Constructor & Destructor Documentation

Analitza::ExpressionType::ExpressionType ( Type  t = Error,
int  any = -1 
)
Analitza::ExpressionType::ExpressionType ( Type  t,
const ExpressionType &  contained,
int  s = 0 
)
Analitza::ExpressionType::ExpressionType ( Type  t,
const QList< ExpressionType > &  alternatives 
)
Analitza::ExpressionType::ExpressionType ( const QString &  objectName)

Constructs a type that identifies a custom Object.

Analitza::ExpressionType::ExpressionType ( const ExpressionType &  t)
Analitza::ExpressionType::~ExpressionType ( )
inline

Definition at line 45 of file expressiontype.h.

Member Function Documentation

void Analitza::ExpressionType::addAlternative ( const ExpressionType &  t)

In case it's a Many type, it adds t as an alternative.

If t is a Many type too, they will be merged

bool Analitza::ExpressionType::addAssumption ( const QString &  bvar,
const ExpressionType &  t 
)
void Analitza::ExpressionType::addAssumptions ( const QMap< QString, ExpressionType > &  a)
ExpressionType& Analitza::ExpressionType::addParameter ( const ExpressionType &  t)
QList<ExpressionType> Analitza::ExpressionType::alternatives ( ) const
inline

Definition at line 56 of file expressiontype.h.

int Analitza::ExpressionType::anyValue ( ) const
inline

Definition at line 61 of file expressiontype.h.

ExpressionType Analitza::ExpressionType::assumptionFor ( const QString &  bvar) const
inline

Definition at line 71 of file expressiontype.h.

QMap<QString, ExpressionType> Analitza::ExpressionType::assumptions ( ) const
QMap<QString, ExpressionType>& Analitza::ExpressionType::assumptions ( )
static bool Analitza::ExpressionType::assumptionsMerge ( QMap< QString, ExpressionType > &  data,
const QMap< QString, ExpressionType > &  newmap 
)
static
static void Analitza::ExpressionType::assumptionsUnion ( QMap< QString, ExpressionType > &  data,
const QMap< QString, ExpressionType > &  newmap 
)
static
bool Analitza::ExpressionType::canCompareTo ( const ExpressionType &  type) const
Returns
false in case that just by looking at the current type we see that it won't be able to be reduced to type. Useful to improve error reporting
bool Analitza::ExpressionType::canReduceTo ( const ExpressionType &  type) const
Returns
true if the current type can be converted into type
void Analitza::ExpressionType::clearAssumptions ( )
static QMap<int, ExpressionType> Analitza::ExpressionType::computeStars ( const QMap< int, ExpressionType > &  initial,
const ExpressionType &  candidate,
const ExpressionType &  type 
)
static
ExpressionType Analitza::ExpressionType::contained ( ) const
int Analitza::ExpressionType::increaseStars ( int  stars)
bool Analitza::ExpressionType::isError ( ) const

Depth search to check if it's defined.

static QList<ExpressionType> Analitza::ExpressionType::lambdaFromArgs ( const QList< ExpressionType > &  args)
static
static QList<ExpressionType> Analitza::ExpressionType::manyFromArgs ( const QList< ExpressionType > &  args)
static
static bool Analitza::ExpressionType::matchAssumptions ( QMap< int, ExpressionType > *  stars,
const QMap< QString, ExpressionType > &  assum1,
const QMap< QString, ExpressionType > &  assum2 
)
static
static ExpressionType Analitza::ExpressionType::minimumType ( const ExpressionType &  t1,
const ExpressionType &  t2 
)
static
QString Analitza::ExpressionType::objectName ( ) const
Returns
the name of a custom type
bool Analitza::ExpressionType::operator!= ( const ExpressionType &  t) const
inline

Definition at line 48 of file expressiontype.h.

ExpressionType Analitza::ExpressionType::operator= ( const ExpressionType &  et)
bool Analitza::ExpressionType::operator== ( const ExpressionType &  t) const
QList<ExpressionType> Analitza::ExpressionType::parameters ( ) const
inline

Definition at line 64 of file expressiontype.h.

QList<ExpressionType>& Analitza::ExpressionType::parameters ( )
inline

Definition at line 65 of file expressiontype.h.

void Analitza::ExpressionType::reduce ( const ExpressionType &  type)

when it's a many type, reduce to the one(s) that can be reduced to

void Analitza::ExpressionType::removeAssumptions ( const QStringList &  bvarStrings)
ExpressionType Analitza::ExpressionType::returnValue ( ) const
ExpressionType& Analitza::ExpressionType::simplifyStars ( )
int Analitza::ExpressionType::size ( ) const
inline

Definition at line 60 of file expressiontype.h.

ExpressionType Analitza::ExpressionType::starsToType ( const QMap< int, ExpressionType > &  info) const

Returns a new type with the stars solved according t info.

QString Analitza::ExpressionType::toString ( ) const
Type Analitza::ExpressionType::type ( ) const
inline

Definition at line 54 of file expressiontype.h.

static QStringList Analitza::ExpressionType::wrongAssumptions ( const QMap< QString, ExpressionType > &  assum1,
const QMap< QString, ExpressionType > &  assum2 
)
static

Member Data Documentation

int Analitza::ExpressionType::m_any

Definition at line 113 of file expressiontype.h.

int Analitza::ExpressionType::m_size

Definition at line 113 of file expressiontype.h.


The documentation for this class was generated from the following file:
  • expressiontype.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