CASTerm Class Reference
[Terms]

Pure abstract class for implementing a term. More...

#include <casterm.h>

Inheritance diagram for CASTerm:

CASObject Product Sum List of all members.

Public Member Functions

virtual void Append (const CASObject *a)
 Appends a CASObject to the operands vector.
 CASTerm ()
 Constructor.
virtual CASObjectCollect () const =0
 Collects the operands.
virtual CASObjectExpand () const =0
 Expands the operands.
virtual bool IsEqual (const CASObject *o) const
 Indicates whether another CASObject is equal to this.
virtual bool IsGT (const CASObject *o) const
 Indicates whether another CASObject is greater than this.
virtual bool IsLT (const CASObject *o) const
 Indicates whether another CASObject is less than this.
virtual bool IsPureNumerical () const
 Indicates whether or not this object is a pure numerical.
unsigned long NumOperands () const
 Returns the number of operands in the vector.
virtual CASObjectPower (const CASObject *exp) const
 Exponentiates the term.
virtual void RemoveNoOpElements ()=0
 Removes operands which have no effect.
virtual void SetAllEvaluated ()
 Used to set all subobject into an evaluated state.
virtual void Sort ()
 Sorts the operands.
virtual CASObjectSortWeight () const
 Returns the sort weight of the CASTerm.
virtual void UnsetAllEvaluated ()
 Used to set all subobjects into an unevaluated state.
virtual ~CASTerm ()
 Destructor.

Protected Member Functions

virtual void GetNonSingleValues (std::vector< const CASObject * > &lst) const
 Populates a vector with non single values.
virtual void GetOperands (const CASTerm *t, std::vector< const CASObject * > &out) const
 Populates the vector with the operands of the given CASTerm.
virtual void GetSingleValues (std::vector< const CASObject * > &lst) const
 Populates a vector with single values.
virtual bool HaveSameOperands (const CASObject *o) const
 Determines whether or not another CASObject has the same operands.
virtual void SetOperands (CASTerm *t, const std::vector< CASObject * > &in) const
 Populates the operands of the given CASTerm with the given vector.
virtual void SetOperands (CASTerm *t, const std::vector< const CASObject * > &in) const
 Populates the operands of the given CASTerm with the given vector.

Protected Attributes

std::vector< CASObject * > operands
 The vector holding the operands.

Detailed Description

Pure abstract class for implementing a term. A term can also be thought of an container of other CASObject, joined by a certain operator. Sum and Product are expamples for that.

Definition at line 60 of file casterm.h.


Member Function Documentation

virtual CASObject* CASTerm::Collect (  )  const [pure virtual]

Definition is left to the implementation of this class.

Remarks:
The CASObject returned by this function has to be freed by the caller.
Returns:
a pointer to the CASObject representing the collected form.

Implemented in Product, and Sum.

virtual CASObject* CASTerm::Expand (  )  const [pure virtual]

Definition is left to the implementation of this class.

Remarks:
The CASObject returned by this function has to be freed by the caller.
Returns:
a pointer to the CASObject representing the expanded form.

Implemented in Product, and Sum.

virtual void CASTerm::RemoveNoOpElements (  )  [pure virtual]

Definition is left to the implementation of this class.

Returns:
void.

Implemented in Product, and Sum.


Member Data Documentation

std::vector<CASObject*> CASTerm::operands [protected]

This is the vector holding the operands of the term, aka. container. It is determined by the derived class by what operator the operands are joined.

Definition at line 69 of file casterm.h.


The documentation for this class was generated from the following files:
Generated on Sun Dec 31 01:57:32 2006 for ECAS by  doxygen 1.4.7