JScience v2.0

org.jscience.mathematics.numbers
Interface Numeric<T extends Numeric<T>>

All Superinterfaces:
Operable<T>, Realtime
All Known Implementing Classes:
Acceleration, AmountOfSubstance, Angle, AngularAcceleration, AngularVelocity, Area, CatalyticActivity, Complex, DataAmount, DataRate, Dimensionless, Duration, ElectricCapacitance, ElectricCharge, ElectricConductance, ElectricCurrent, ElectricInductance, ElectricPotential, ElectricResistance, Energy, Float32, Float64, Force, Frequency, Illuminance, Integer32, Integer64, LargeInteger, Length, LuminousFlux, LuminousIntensity, MagneticFlux, MagneticFluxDensity, Mass, Money, Number, Power, Pressure, Quantity, RadiationDoseAbsorbed, RadiationDoseEffective, RadioactiveActivity, Rational, Real, SolidAngle, Temperature, Torque, Velocity, Volume, VolumetricDensity

public interface Numeric<T extends Numeric<T>>
extends Operable<T>

This interface identifies operables for which the length, size, or extent can be calculated (see norm()).

Version:
2.0, June 6, 2004
Author:
Jean-Marie Dautelle
See Also:
Norm -- from MathWorld

Nested Class Summary
 
Nested classes/interfaces inherited from interface javolution.realtime.Realtime
Realtime.ObjectSpace
 
Method Summary
 boolean isLargerThan(T that)
          Compares the norm of this numeric with that numeric.
 T norm()
          Returns the norm (or magnitude) of this numeric.
 T sqrt()
          Returns the square root of this numeric.
 
Methods inherited from interface org.jscience.mathematics.matrices.Operable
opposite, plus, reciprocal, times
 
Methods inherited from interface javolution.realtime.Realtime
move, toText
 

Method Detail

isLargerThan

boolean isLargerThan(T that)
Compares the norm of this numeric with that numeric.

Parameters:
that - the numeric to be compared with.
Returns:
|this| > |that|

norm

T norm()
Returns the norm (or magnitude) of this numeric.

Returns:
|this|

sqrt

T sqrt()
Returns the square root of this numeric.

Returns:
the numeric sqrt such as sqrt.times(sqrt) = this
Throws:
java.lang.ArithmeticException - if the square root cannot be calculated.

JScience v2.0

Copyright © 2005 JScience.