[Main page]
[Current Project] [Old projects] [Programming details]

[Projectos] [Projectos anteriores] [Diversos]
[Página principal]

Algebra project


An overview of how this editor works.

The editor is based on a collection of algebraic C++ objects, all derived from nucleo object.
All operators and groups are nucleo containers. Containers also derive from nucleo class so a tree structure can be build to represent an algebraic expression, with operators containing other operators.
A nucleo object reacts to edition changes by changing they own type if necessary (recognising nominals, literal and booleans) or rearanging the lists dependencies.
Due to this constant parsing the algebraic is always ready for manipulation with literals, nominals, booleans, operators and functions being isolated objects, nominal objects also have an internal value of type double.

A sample expression.

Diagram of the neested lists builded by this editor in order to represent the sample expression.

This lists are neested according to the priority of the intervinient operators, the editor does all the ordering as the user writes (active parser).

As a result of this, no aditional parse is needed, once the user finishes the equation, it is ready for calculation or other sort of operations you may implement on it.
Never worry about priority's and precedence!

What about y=m*(x+b) ?
This will only happen if you write the parentesis, otherwise the first case will always be considered.

What is the advantage?
Think on a calculation: When requesting to calculate is sent to the base of the equation (in this case the = operator), it will calculate on the result of calculate process of each members recursively. Finaly the simple elements return them selfs on calculation in order to end the recursion, resuming to the calculation of the base (in this case a boolean value or another simplified expression).

All the parsing consuming time is distributed in small gaps while editing, leaving all computing power to calculation time (like indexing advantage for databases).

I am using Microsoft® VC++ 5 © and the project is MFC© dependent at this moment.


Versions track for beta-testing purposes

download here the v039 exe + AlgEdit.dll file (178kb)
(assuming that you already have the DLL's: mfc42.dll, msvcirt.dll, msvcrt.dll)

to solve:

v039 - 97Sep22 - web distributed
v035 - 97Sep16 - web distributed
v034 - 97Sep16 - web distributed
v022 to v033
v021 - 97Aug25 - web distributed
v020 - 97Aug25 - web distributed
v019 - 97Aug25
v018 - 97Aug25
v017 - 97Aug24
v016 - 97Aug21 - web distributed
v015 - 97Aug20
v014 - 97Aug19 - web distributed
v013 - 97Aug18 - web distributed
v012:
v011:
v010 - first (VC++ 5) version delivered for beta testing

C++ Classes derivation map (major classes)

class nucleo // base for all algebraic objects
  • class field:public nucleo// Generic edit zone and text container object
  • class literal:public field
  • class nominal:public field// contains nominal values (double precision)
  • class booleano:public field// logic values TRUE or FALSE
  • class infinit:public field// + and - infinits
  • class container:public nucleo// base for all operators and functions (implemented as a double list)
  • class operat:public list//
  • class unaryOp:public operat// base for unary operators
  • class parentesis:public opUnario//
  • class negation:public opUnario// operator -
  • class plusOrMinus:public negation//operator +/-
  • class compos:public opUnario// to be used on a base composition
  • class equal:public compos//
  • class greater:public compos//
  • class lessThan:public compos//
  • class greatOrEqual:public compos//
  • class lessOrEqual:public compos//
  • class notEqual:public compos//
  • class relation:public compos//
  • class implication:public relation//
  • class equivalence:public relation//
  • class binaryOp:public operat// base for all binary operators
  • class power:public opBinario//
  • class radical:public power//
  • class logaritm:public opBinario//
  • class sum:public operat//
  • class multiplication:public operat//
  • class quocient:public operat//
  • class logic:public operat//
  • class logicAnd:public logic//
  • class logicOr:public logic//
  • class function:public operat//
  • class trig:public function//
  • class algSin:public trig//
  • class algCos:public trig//
  • class algTan:public trig//
  • class algCotan:public trig//
  • class algASin:public trig//
  • class algACos:public trig//
  • class algATan:public trig//
  • class userFunc:public function//
  • class resolution:public operat// composed by members like <=> and =>
  • class simplification:public resolution// composed by members like < > = >= <= and <>
    top of this page

    last update: 97/09/22
    Rui H F Azevedo

    ruihfazevedo@yahoo.com

    This page hosted by Get your own Free Home Page

    Software HyperBanner Advertisement

    Member of Software HyperBanner
    1