Environment for
DeveLoping
KDD-Applications
Supported by Index-Structures

de.lmu.ifi.dbs.elki.data
Interface Arithmetic<N extends Number>

All Superinterfaces:
Comparable<N>
All Known Implementing Classes:
RationalNumber

public interface Arithmetic<N extends Number>
extends Comparable<N>

An interface to define requirements for a number to perform arithmetic operations. The Numbers are supposed to remain unchanged by an arithmetic operation.

Author:
Arthur Zimek

Method Summary
 N divided(N number)
          Divides this number by the given number.
 N minus(N number)
          Subtracts the given number from this number.
 N plus(N number)
          Adds the given number to this number.
 N times(N number)
          Multiplies this number with the given number.
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Method Detail

plus

N plus(N number)
Adds the given number to this number.

Parameters:
number - the number to add to this number.
Returns:
the result of arithmetic addition of this Number with the given number

times

N times(N number)
Multiplies this number with the given number.

Parameters:
number - the number to multiply this number with
Returns:
the result of arithmetic multiplication of this Number with the given number

minus

N minus(N number)
Subtracts the given number from this number.

Parameters:
number - the number to subtract from this number
Returns:
the result of arithmetic subtraction of the given number from this Number

divided

N divided(N number)
Divides this number by the given number.

Parameters:
number - the number to divide this number by
Returns:
the result of arithmetic division of this Number by the given number

Release 0.1 (2008-07-10_1838)