Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.lsmp.djep.groupJep.groups
Class BigReals

    java.lang.Object
      org.lsmp.djep.groupJep.groups.Group
          org.lsmp.djep.groupJep.groups.BigReals

All Implemented Interfaces:
  GroupI, AbelianGroupI, FieldI, HasDivI, IntegralDomainI, OrderedSetI, RingI

    public class BigReals

extends Group
implements FieldI, OrderedSetI

The field of Reals represented by BigDecimals. TODO Sorry power is not implemented.

Author:
  Rich Morris Created on 05-Mar-2004
See Also:
  `BigDecimal`

Constructor Summary
`BigReals(int scale)` Create a BigReals group with round mode set to BigDecimal.ROUND_HALF_DOWN.
`BigReals(int scale, int roundMode)` Create a field of BigIntegers.

Method Summary
`java.lang.Number` | `add(java.lang.Number num1, java.lang.Number num2)` Get sum of the numbers
`int` | `compare(java.lang.Number a, java.lang.Number b)` Returns -1,0,1 depending on whether a is less than, equal to or greater than b.
`java.lang.Number` | `div(java.lang.Number num1, java.lang.Number num2)` get division of two numbers. i.e. a * ( b^-1).
`boolean` | `equals(java.lang.Number a, java.lang.Number b)` whether two numbers are equal
`java.lang.Number` | `getInverse(java.lang.Number num)` Get Inverse of a number
`java.lang.Number` | `getMulInverse(java.lang.Number num)` get mul inverse
`java.lang.Number` | `getONE()` Get multiplicative identity i.e. 1.
`java.lang.Number` | `getZERO()` Returns the identity element under +
`java.lang.Number` | `mul(java.lang.Number num1, java.lang.Number num2)` Returns the product of two numbers, a*b
`java.lang.Number` | `sub(java.lang.Number num1, java.lang.Number num2)` Get the difference of the numbers.
`java.lang.Number` | `valueOf(java.lang.String str)` returns number given by the string

Methods inherited from class org.lsmp.djep.groupJep.groups.Group
`addStandardConstants, addStandardFunctions, getNumberFactory, isConstantPoly, toString`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Methods inherited from interface org.lsmp.djep.groupJep.GroupI
`addStandardConstants, addStandardFunctions, getNumberFactory, isConstantPoly`

Constructor Detail

### BigReals

    public BigReals(int scale,
                    int roundMode)

  Create a field of BigIntegers. The round mode and scale are used during the div method which calls `BigDecimal.divide(BigDecimal,int,int)`. if scale is negative then the `BigDecimal.divide(BigDecimal,int)`. is called instead.

### BigReals

    public BigReals(int scale)

  Create a BigReals group with round mode set to BigDecimal.ROUND_HALF_DOWN.

  Parameters:
    `scale` -

Method Detail

### getZERO

    public java.lang.Number getZERO()

  Description copied from interface: `GroupI`
  Returns the identity element under +

  Specified by:
    `getZERO` in interface `GroupI`

### getONE

    public java.lang.Number getONE()

  Description copied from interface: `RingI`
  Get multiplicative identity i.e. 1. Strictly speaking a ring need not have a mul indentity. However most useful ones do, and they are not all integral domains.

  Specified by:
    `getONE` in interface `RingI`

### getInverse

    public java.lang.Number getInverse(java.lang.Number num)

  Description copied from interface: `GroupI`
  Get Inverse of a number

  Specified by:
    `getInverse` in interface `GroupI`

### getMulInverse

    public java.lang.Number getMulInverse(java.lang.Number num)

  Description copied from interface: `FieldI`
  get mul inverse

  Specified by:
    `getMulInverse` in interface `FieldI`

### add

    public java.lang.Number add(java.lang.Number num1,
                                java.lang.Number num2)

  Description copied from interface: `GroupI`
  Get sum of the numbers

  Specified by:
    `add` in interface `GroupI`

### sub

    public java.lang.Number sub(java.lang.Number num1,
                                java.lang.Number num2)

  Description copied from interface: `GroupI`
  Get the difference of the numbers. i.e. a + (-b)

  Specified by:
    `sub` in interface `GroupI`

### mul

    public java.lang.Number mul(java.lang.Number num1,
                                java.lang.Number num2)

  Description copied from interface: `RingI`
  Returns the product of two numbers, a*b

  Specified by:
    `mul` in interface `RingI`

### div

    public java.lang.Number div(java.lang.Number num1,
                                java.lang.Number num2)

  Description copied from interface: `HasDivI`
  get division of two numbers. i.e. a * ( b^-1). Strictly speeking

  Specified by:
    `div` in interface `HasDivI`

### equals

    public boolean equals(java.lang.Number a,
                          java.lang.Number b)

  Description copied from interface: `GroupI`
  whether two numbers are equal

  Specified by:
    `equals` in interface `GroupI`

### compare

    public int compare(java.lang.Number a,
                       java.lang.Number b)

  Description copied from interface: `OrderedSetI`
  Returns -1,0,1 depending on whether a is less than, equal to or greater than b.

  Specified by:
    `compare` in interface `OrderedSetI`

### valueOf

    public java.lang.Number valueOf(java.lang.String str)

  Description copied from interface: `GroupI`
  returns number given by the string

  Specified by:
    `valueOf` in interface `GroupI`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

http://www.singularsys.com/jep Copyright © 2007 Singular Systems