|
JADE v6.1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
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.
| 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 |
public Operable plus(Operable that)
that - the object to be added.
this + that.public Operable opposite()
this.plus(this.opposite()) == ZERO,
with ZERO being the additive identity.
-this.public Operable times(Operable that)
that - the object multiplier.
this * that.public Operable reciprocal()
this.times(this.reciprocal()) == ONE ,
with ONE being the multiplicative identity.
ONE / this.
|
JADE v6.1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||