Back to index

wims  3.65+svn20090927
Public Member Functions | Static Public Attributes | Private Attributes
fr.ove.openmath.jome.model.processor.WidthDepthProcessor Class Reference

A Width-Depth processor. More...

Inheritance diagram for fr.ove.openmath.jome.model.processor.WidthDepthProcessor:
Inheritance graph
[legend]
Collaboration diagram for fr.ove.openmath.jome.model.processor.WidthDepthProcessor:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 WidthDepthProcessor (Formula formula)
 The constructor.
void doProcess ()
 Does processing.
void setLevel (int level)
 Sets the level from which the processing starts.
void setDepthLevel (int depthLevel)
 Sets the depth level form which the processing will be considering.
int getDepthLevel ()
 Returns the depth level form which the processing will be considering.
int getMaxDepthValue ()
 Returns the max depth value calculated.
void setWidthLevel (int widthLevel)
 Sets the width level form which the processing will be considering.
int getWidthLevel ()
 Returns the width level form which the processing will be considering.
void setView (int view)
 Sets the number of children viewed.
int getView ()
 Returns the number of children viewed.
Vector getWidthList ()
 Returns the list of widths calculated.
int getBiggestWidth ()
 Returns the biggest width calculated.
void setFormula (Formula formula)
 Sets the formula to processs.
Formula getFormula ()
 Returns the formula to process.
void setUpdateDisplay (boolean updateDisplay)
 Specifies if, after processing the formula, the display has to be updated.
boolean getUpdateDisplay ()
 Checks if, after processing the formula, the display has to be updated.
void init ()
 Initialisation of the processor.
void setProcessingId (int processingId)
 Sets the processing to execute.
int getProcessingId ()
 Returns the current processing to execute.
int getLevel ()
 Returns the level from which the processing starts.

Static Public Attributes

static final int COMPUTE = 1
 The different processing to apply to the formula.
static final int SIMPLE_ICONIFICATION = 2
 Iconify the formula according to the iconification level fixed.
static final int RECURSIVE_ICONIFICATION = 3
 Iconify the formula according to the iconification level fixed.
static final int COMPUTE_AND_ICONIFY = 4
 Compute and iconify (recursivly) the formula according to the iconification level fixed.

Private Attributes

DepthProcessor depth
 The depth processor.
WidthProcessor width
 The width processor.

Detailed Description

A Width-Depth processor.


It is a mix bettween a Width processor (

See also:
WidthProcessor) and a Depth processor (
DepthProcessor).
The iconification of the formula operates in 2 phases :
  1. iconification of a certain amount of operands of the operators whose number of operands is greater than a specified value
  2. iconification of the subtree of the formula tree structure whose depth is greater than than the specified value
Author:
2000 DIRAT Laurent
Version:
1.0 22/08/2000

Definition at line 50 of file WidthDepthProcessor.java.


Constructor & Destructor Documentation

The constructor.

Parameters:
formulathe formula to process.

Definition at line 66 of file WidthDepthProcessor.java.

                                                {
        super(formula);
        depth = new DepthProcessor(formula);
        width = new WidthProcessor(formula);
    }

Member Function Documentation

Does processing.

Reimplemented from fr.ove.openmath.jome.model.processor.ProcessorImpl.

Definition at line 75 of file WidthDepthProcessor.java.

                            {
        Formula formula = getFormula();
        
        if (formula != null) {
            width.setProcessingId(getProcessingId());
            width.doProcess();
            depth.setProcessingId(getProcessingId());
            depth.doProcess();
            
            /*
            switch (getProcessingId()) {
                case COMPUTE :
                    width.setProcessingId(COMPUTE);
                    width.doProcess();
                    depth.setProcessingId(COMPUTE);
                    depth.doProcess();
                    break;
                case SIMPLE_ICONIFICATION :
                    width.setProcessingId(SIMPLE_ICONIFICATION);
                    width.doProcess();
                    depth.setProcessingId(SIMPLE_ICONIFICATION);
                    depth.doProcess();
                    break;
                case RECURSIVE_ICONIFICATION :
                    width.setProcessingId(RECURSIVE_ICONIFICATION);
                    width.doProcess();
                    depth.setProcessingId(RECURSIVE_ICONIFICATION);
                    depth.doProcess();
                    break;
                case COMPUTE_AND_ICONIFY :
                    width.setProcessingId(COMPUTE_AND_ICONIFY);
                    width.doProcess();
                    depth.setProcessingId(COMPUTE_AND_ICONIFY);
                    depth.doProcess();
            }
            */
        }
    }

Here is the call graph for this function:

Returns the biggest width calculated.

Implements fr.ove.openmath.jome.model.processor.WidthProcessorInterface.

Definition at line 202 of file WidthDepthProcessor.java.

                                 {
        return width.getBiggestWidth();
    }

Here is the call graph for this function:

Returns the depth level form which the processing will be considering.


For convenience only, in most cases this method is equivalent to the

See also:
getLevel of the
Processor interface.

Implements fr.ove.openmath.jome.model.processor.DepthProcessorInterface.

Definition at line 143 of file WidthDepthProcessor.java.

                               {
        return depth.getLevel();
    }

Here is the call graph for this function:

Returns the formula to process.

Implements fr.ove.openmath.jome.model.processor.Processor.

Definition at line 88 of file ProcessorImpl.java.

                                {
        return formula;
    }

Here is the caller graph for this function:

Returns the level from which the processing starts.

Implements fr.ove.openmath.jome.model.processor.Processor.

Definition at line 147 of file ProcessorImpl.java.

                          {
        return level;
    }

Here is the caller graph for this function:

Returns the max depth value calculated.

Implements fr.ove.openmath.jome.model.processor.DepthProcessorInterface.

Definition at line 150 of file WidthDepthProcessor.java.

                                  {
        return depth.getMaxDepthValue();
    }

Here is the call graph for this function:

Returns the current processing to execute.

Implements fr.ove.openmath.jome.model.processor.Processor.

Definition at line 132 of file ProcessorImpl.java.

                                 {
        return processingId;
    }

Here is the caller graph for this function:

Checks if, after processing the formula, the display has to be updated.

Returns:
true if the display needs update. false otherwise.

Implements fr.ove.openmath.jome.model.processor.Processor.

Definition at line 108 of file ProcessorImpl.java.

                                      {
        return updateDisplay;
    }

Here is the caller graph for this function:

Returns the number of children viewed.

Implements fr.ove.openmath.jome.model.processor.WidthProcessorInterface.

Definition at line 188 of file WidthDepthProcessor.java.

                         {
        return width.getView();
    }

Here is the call graph for this function:

Returns the width level form which the processing will be considering.


For convenience only, in most cases this method is equivalent to the

See also:
getLevel of the
Processor interface.

Implements fr.ove.openmath.jome.model.processor.WidthProcessorInterface.

Definition at line 173 of file WidthDepthProcessor.java.

                               {
        return width.getLevel();
    }

Here is the call graph for this function:

Returns the list of widths calculated.

Implements fr.ove.openmath.jome.model.processor.WidthProcessorInterface.

Definition at line 195 of file WidthDepthProcessor.java.

                                 {
        return width.getWidthList();
    }

Here is the call graph for this function:

Initialisation of the processor.

!! Method to override by subclasses !! The default is just setting the processing Id to be COMPUTE_AND_ICONIFY;

Implements fr.ove.openmath.jome.model.processor.Processor.

Definition at line 117 of file ProcessorImpl.java.

Here is the call graph for this function:

Sets the depth level form which the processing will be considering.


For convenience only, in most cases this method is equivalent to the

See also:
setLevel of the
Processor interface.
Parameters:
depthLevelthe depth level.

Implements fr.ove.openmath.jome.model.processor.DepthProcessorInterface.

Definition at line 134 of file WidthDepthProcessor.java.

                                              {
        depth.setLevel(depthLevel);
    }

Here is the call graph for this function:

Sets the formula to processs.

Implements fr.ove.openmath.jome.model.processor.Processor.

Definition at line 81 of file ProcessorImpl.java.

                                            {
        this.formula = formula;
    }

Sets the level from which the processing starts.


The level correspond for both width and depth processor.

Parameters:
levelthe level.

Reimplemented from fr.ove.openmath.jome.model.processor.ProcessorImpl.

Definition at line 119 of file WidthDepthProcessor.java.

Here is the call graph for this function:

void fr.ove.openmath.jome.model.processor.ProcessorImpl.setProcessingId ( int  processingId) [inline, inherited]

Sets the processing to execute.

Parameters:
processingIdthe processing Id.

Implements fr.ove.openmath.jome.model.processor.Processor.

Definition at line 125 of file ProcessorImpl.java.

Here is the caller graph for this function:

Specifies if, after processing the formula, the display has to be updated.

Parameters:
updateDisplaytrue if the display needs update. false otherwise.

Implements fr.ove.openmath.jome.model.processor.Processor.

Definition at line 98 of file ProcessorImpl.java.

Here is the caller graph for this function:

Sets the number of children viewed.

Parameters:
thenumber of children viewed.

Implements fr.ove.openmath.jome.model.processor.WidthProcessorInterface.

Definition at line 181 of file WidthDepthProcessor.java.

                                  {
        width.setView(view);
    }

Here is the call graph for this function:

Sets the width level form which the processing will be considering.


For convenience only, in most cases this method is equivalent to the

See also:
setLevel of the
Processor interface.
Parameters:
widthLevelthe width level.

Implements fr.ove.openmath.jome.model.processor.WidthProcessorInterface.

Definition at line 164 of file WidthDepthProcessor.java.

                                              {
        width.setLevel(widthLevel);
    }

Here is the call graph for this function:


Member Data Documentation

The different processing to apply to the formula.

Compute the the necessaru stuff for the iconifcation of the formula.

Definition at line 160 of file ProcessorImpl.java.

Compute and iconify (recursivly) the formula according to the iconification level fixed.


This is the default behaviour.

Definition at line 180 of file ProcessorImpl.java.

The depth processor.

Definition at line 54 of file WidthDepthProcessor.java.

Iconify the formula according to the iconification level fixed.


We assume the necessary computation for the iconification of the formula was previously done.
This is a recursive iconification process. Subtrees of iconfied ones are also iconified.

Definition at line 174 of file ProcessorImpl.java.

Iconify the formula according to the iconification level fixed.


We assume the necessary computation for the iconification of the formula was previously done.
This is a simple iconification process. Subtrees of iconfied ones are not iconified.

Definition at line 167 of file ProcessorImpl.java.

The width processor.

Definition at line 59 of file WidthDepthProcessor.java.


The documentation for this class was generated from the following file: