JSci.maths.fields
Class RealField

java.lang.Object
  extended by JSci.maths.fields.RealField
All Implemented Interfaces:
Field, Ring, AbelianGroup

public final class RealField
extends java.lang.Object
implements Field

The RealField class encapsulates the field of real numbers.


Nested Class Summary
 
Nested classes/interfaces inherited from interface JSci.maths.fields.Field
Field.Member
 
Field Summary
static MathDouble E
           
static MathDouble GAMMA
           
static MathDouble INFINITY
           
static MathDouble NaN
           
static MathDouble ONE
           
static MathDouble PI
           
static MathDouble ZERO
           
 
Method Summary
static RealField getInstance()
          Constructs a field of real numbers.
 boolean isInverse(Field.Member a, Field.Member b)
          Returns true if one real number is the inverse of the other.
 boolean isNegative(AbelianGroup.Member a, AbelianGroup.Member b)
          Returns true if one real number is the negative of the other.
 boolean isOne(Ring.Member r)
          Returns true if the real number is equal to one.
 boolean isZero(AbelianGroup.Member g)
          Returns true if the real number is equal to zero.
 Ring.Member one()
          Returns the real number one.
 AbelianGroup.Member zero()
          Returns the real number zero.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ZERO

public static final MathDouble ZERO

ONE

public static final MathDouble ONE

PI

public static final MathDouble PI

E

public static final MathDouble E

GAMMA

public static final MathDouble GAMMA

INFINITY

public static final MathDouble INFINITY

NaN

public static final MathDouble NaN
Method Detail

getInstance

public static final RealField getInstance()
Constructs a field of real numbers. Singleton.


zero

public AbelianGroup.Member zero()
Returns the real number zero.

Specified by:
zero in interface AbelianGroup

isZero

public boolean isZero(AbelianGroup.Member g)
Returns true if the real number is equal to zero.

Specified by:
isZero in interface AbelianGroup
Parameters:
g - a group member

isNegative

public boolean isNegative(AbelianGroup.Member a,
                          AbelianGroup.Member b)
Returns true if one real number is the negative of the other.

Specified by:
isNegative in interface AbelianGroup
Parameters:
a - a group member
b - a group member

one

public Ring.Member one()
Returns the real number one.

Specified by:
one in interface Ring

isOne

public boolean isOne(Ring.Member r)
Returns true if the real number is equal to one.

Specified by:
isOne in interface Ring

isInverse

public boolean isInverse(Field.Member a,
                         Field.Member b)
Returns true if one real number is the inverse of the other.

Specified by:
isInverse in interface Field