JADE v6.1

com.dautelle.math
Interface Operable

All Known Implementing Classes:
Function, Matrix, RealtimeNumber

public interface Operable

This interface abstracts the fundamental arithmetic operations: plus (+), times (*), opposite (-) and reciprocal (1/).

If the set of objects implementing this interface is commutative under addition and associative under multiplication and the two operations are related by distributive laws, then it forms a mathematical ring (linear algebra). System of linear equations involving these objects can be resolved using the Matrix class.

Typically, Operable classes provide also non-generic operations as well. Such as: add, subtract, negate, multiply, divide and inverse.

Version:
4.6, August 4, 2003
Author:
Jean-Marie Dautelle

Method Summary
 Operable opposite()
          Returns the additive inverse of this object.
 Operable plus(Operable that)
          Returns the sum of this object with the one specified.
 Operable reciprocal()
          Returns the multiplicative inverse of this object.
 Operable times(Operable that)
          Returns the product of this object with the one specified.
 

Method Detail

plus

public Operable plus(Operable that)
Returns the sum of this object with the one specified.

Parameters:
that - the object to be added.
Returns:
this + that.

opposite

public Operable opposite()
Returns the additive inverse of this object. It is the object such as this.plus(this.opposite()) == ZERO, with ZERO being the additive identity.

Returns:
-this.

times

public Operable times(Operable that)
Returns the product of this object with the one specified.

Parameters:
that - the object multiplier.
Returns:
this * that.

reciprocal

public Operable reciprocal()
Returns the multiplicative inverse of this object. It it the object such as this.times(this.reciprocal()) == ONE , with ONE being the multiplicative identity.

Returns:
ONE / this.

JADE v6.1

Copyright © 2004 Jean-Marie Dautelle.