Class Modulo

java.lang.Object
  |
  +--Operator
        |
        +--Modulo
All Implemented Interfaces:
ArithExpr

class Modulo
extends Operator

Noeuds % des expressions arithmétiques


Constructor Summary
(package private) Modulo(ArithExpr left, ArithExpr right)
           
 
Method Summary
 double eval()
          Évaluation sans environnement
 double eval(Environment e)
          Évaluation avec environnement
protected  double operation(double x, double y)
          Opération entre nombres flottants associée à ce noeud.
protected  String symbol()
          Chaîne représentant l'opération en infixe
protected  String tag()
          Chaîne représentant l'opération en MathML
 String toMathML()
          Représentation infixe de l'expression
 String toString()
          Représentation infixe de l'expression
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Modulo

Modulo(ArithExpr left,
       ArithExpr right)
Method Detail

operation

protected double operation(double x,
                           double y)
Opération entre nombres flottants associée à ce noeud. Le résultat est calculé à l'aide de la fonction Math.IEEEremainder.

Specified by:
operation in class Operator
Parameters:
x - premier nombre flottant
y - deuxième nombre flottant
Returns:
résultat de l'opération

symbol

protected String symbol()
Chaîne représentant l'opération en infixe

Specified by:
symbol in class Operator
Returns:
chaîne

tag

protected String tag()
Chaîne représentant l'opération en MathML

Specified by:
tag in class Operator
Returns:
chaîne

eval

public double eval()
Évaluation sans environnement

Specified by:
eval in interface ArithExpr
Returns:
valeur de l'évaluation

eval

public double eval(Environment e)
            throws UnboundVariableException
Évaluation avec environnement

Specified by:
eval in interface ArithExpr
Returns:
valeur de l'évaluation
Throws:
UnboundVariableException - si aucune expression n'est affectée à une variable apparaissant dans l'expression.

toString

public String toString()
Représentation infixe de l'expression

Overrides:
toString in class Object
Returns:
représentation

toMathML

public String toMathML()
Représentation infixe de l'expression

Specified by:
toMathML in interface ArithExpr
Returns:
représentation