Class Times

All Implemented Interfaces:
Expression

public final class Times extends Operation
This class represents the arithmetic multiplication operation "*". The class extends an abstract superclass Operation. Other subclasses of Operation represent other arithmetic operations.
See Also:
  • Constructor Details

  • Method Details

    • op

      public Real op(Real r1, Real r2)
      The actual computation of the (binary) arithmetic multiplication of two Reals
      Specified by:
      op in class Operation
      Parameters:
      r1 - The first Real
      r2 - The second Real
      Returns:
      The (new) Real that is the result of the multiplication
    • op

      public IntegerAtom op(IntegerAtom i1, IntegerAtom i2)
      The actual computation of the (binary) arithmetic multiplication of two Integers
      Specified by:
      op in class Operation
      Parameters:
      i1 - The first IntegerAtom
      i2 - The second IntegerAtom
      Returns:
      The (new) IntegerAtom that is the result of the multiplication
    • op

      public Complex op(Complex c1, Complex c2)
      Description copied from class: Operation
      Abstract method representing the actual binary arithmetic operation to compute on Complexes
      Specified by:
      op in class Operation
      Parameters:
      c1 - first Complex of the binary operation
      c2 - second Complex of the binary operation
      Returns:
      result of computing the binary operation
    • op

      public Rationnal op(Rationnal q1, Rationnal q2)
      Description copied from class: Operation
      Abstract method representing the actual binary arithmetic operation to compute on Rationnals
      Specified by:
      op in class Operation
      Parameters:
      q1 - first Rationnal of the binary operation
      q2 - second Rationnal of the binary operation
      Returns:
      result of computing the binary operation