Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members | Related Pages

Solver.cpp File Reference


Detailed Description

Implements the mcSolver class.

Author:
Francesco Montorsi
Date:
20-4-2004

Definition in file Solver.cpp.

#include "mc/mcprec.h"
#include "mc/Solver.h"
#include "mc/MathSystem.h"
#include "mc/MathAndSystem.h"
#include "mc/MathOrSystem.h"
#include "mc/Symbol.h"

Include dependency graph for Solver.cpp:

Go to the source code of this file.

Defines

#define mcDEFINE_EXPSIM_STEP(x, y)
#define mcDEFINE_EXPSIM_COMPLETE(x, y)

Functions

 mcDEFINE_EXPSIM_STEP (math_DoSimplifyStep, math_Simplify) mcDEFINE_EXPSIM_STEP(math_DoExpandStep
math_Expand mcDEFINE_EXPSIM_COMPLETE (math_DoCompleteSimplification, math_DoSimplifyStep) mcDEFINE_EXPSIM_COMPLETE(math_DoCompleteExpansion


Define Documentation

#define mcDEFINE_EXPSIM_COMPLETE x,
 ) 
 

Value:

void mcSolver::x(long flags, long rflags,       \
     mcMathLine &last, mcSystemStepArray &steps) { \
  mcExpSimRes res;           \
  int cycles = 0;            \
                 \
  /* do first simplification step */       \
  y(flags, rflags, last, steps, &res);      \
  mcSOLVERLOG(wxT("mcSolver::") wxT(#x)      \
    wxT(" - completed 0-th step [%s]"), mcTXT(last)); \
  cycles++;             \
                 \
  /* add steps until the process is complete;         */  \
  /* the mcELEMENTMATH_MAX_PROCESS_CYCLES limit is    */  \
  /* used to avoid to get trapped in an infinite loop */  \
  while (res != mcESR_DONE &&         \
    cycles < mcELEMENTMATH_MAX_PROCESS_CYCLES) {   \
                  \
   /* do another step */         \
   y(flags, rflags, last, steps, &res);     \
   mcSOLVERLOG(wxT("mcSolver::") wxT(#x)     \
     wxT(" - completed %d-th step [%s]"),   \
        cycles, mcTXT(last));    \
   cycles++;            \
  }               \
 }

Definition at line 147 of file Solver.cpp.

#define mcDEFINE_EXPSIM_STEP x,
 ) 
 

Value:

void mcSolver::x(long flags, long rflags, mcMathLine &tosimp, \
       mcSystemStepArray &steps,    \
                 mcExpSimRes *result) {     \
  /* simplify & (eventually) store simplification result */ \
  mcExpSimRes res = tosimp.y(flags, rflags);     \
  if (result) *result = res;         \
  steps.data_AddLine(tosimp);         \
 }

Definition at line 137 of file Solver.cpp.


Function Documentation

math_Expand mcDEFINE_EXPSIM_COMPLETE math_DoCompleteSimplification  ,
math_DoSimplifyStep 
 

mcDEFINE_EXPSIM_STEP math_DoSimplifyStep  ,
math_Simplify 
 



Documentation generated with Doxygen on Sun Feb 6 17:12:07 2005
Visit MathStudio home page for more info

[ Top ]