Indicates that the algebra requires cloning of the left side operand and implements a
cloneThis()
method.
Note: The following is relevant only if you want to implement your own algebra class.
If the algebra implements the operation
opndLeft op opndRght
as
opndLeft.op(opndRght)
and the implemented instance method
op
modifies the instance
opndLeft
, the
left side operand
opndLeft
in the expression
opndLeft op opndRght
is
cloned internally using
opndLeft.
cloneThis()
before calling the operator method to avoid an unintended modification of
opndLeft
.
The operator method is not necessarily required by JXN to modify the instance (it is sufficient, that the operator method returns the result)
but saves memory and processing time, if the algebra objects are large. If the operator methods of a class like e.g.
→
java.math.
BigInteger
or
Commons Math →
BigFraction
do not modify the left side operand the class can be used in JXN arithmetic expressions without the implementation of this interface.