org.abora.white.tumbler
Class RealPos

java.lang.Object
  |
  +--org.abora.white.xpp.basic.Heaper
        |
        +--org.abora.white.spaces.basic.Position
              |
              +--org.abora.white.tumbler.RealPos
Direct Known Subclasses:
IEEE32Pos, IEEE64Pos

public abstract class RealPos
extends Position

Represents some real number exactly. Not all real numbers can be exactly represented. See class comment in RealSpace.


Constructor Summary
protected RealPos()
           
  RealPos(Rcvr receiver)
           
 
Method Summary
 int actualHashForEqual()
          since we redefine equal, subclasses had better redefine actualHashForEqual
abstract  double asIEEE()
          Returns the value as IEEE basic data type is big enough to hold any value which can be put into an XuReal.
abstract  double asIEEE64()
          Returns the value as IEEE64 (double precision).
 XnRegion asRegion()
          Essential.
 CoordinateSpace coordinateSpace()
          Essential.
static java.lang.String exportName()
           
static void info()
          {PrimFloat CLIENT} value
 boolean isEqual(Heaper other)
          Return true if the two objects are equal.
 boolean isGE(Position other)
           
static RealPos make(double value)
          make an XuReal given an IEEE floating point number of whatever precision on this platform is able to hold all the real numbers currently representable by an XuReal.
static RealPos makeIEEE32(float value)
          See comment in XuReal::makeIEEE64
static RealPos makeIEEE64(double value)
          Returns an XuReal which exactly represents the same real number that is represented by 'value'.
abstract  int precision()
          What precision is it, in terms of the number of bits used to represent it.
 void sendSelfTo(Xmtr xmtr)
           
abstract  PrimFloatValue value()
          Essential.
 
Methods inherited from class org.abora.white.xpp.basic.Heaper
destroy, destruct, equals, hashForEqual, printContentsOn, printOn, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RealPos

protected RealPos()

RealPos

public RealPos(Rcvr receiver)
Method Detail

asRegion

public XnRegion asRegion()
Description copied from class: Position
Essential. A region containing this position as its only element.

Specified by:
asRegion in class Position

coordinateSpace

public CoordinateSpace coordinateSpace()
Description copied from class: Position
Essential. The coordinate space this is a position in. This implies that a position object is only a position in one particular coordinate space.

Specified by:
coordinateSpace in class Position

value

public abstract PrimFloatValue value()
Essential. Return the number as a PrimFloat object from which you can get it in a variety of representations.


actualHashForEqual

public int actualHashForEqual()
Description copied from class: Position
since we redefine equal, subclasses had better redefine actualHashForEqual

Overrides:
actualHashForEqual in class Position

isEqual

public boolean isEqual(Heaper other)
Description copied from class: Heaper
Return true if the two objects are equal.

Specified by:
isEqual in class Position

isGE

public boolean isGE(Position other)

asIEEE

public abstract double asIEEE()
Returns the value as IEEE basic data type is big enough to hold any value which can be put into an XuReal. Currently this is an IEEE64 (double precision). In future releases of this API, the return type of this method may be changed to IEEE128 (quad precision). Once we support other ways of representing real numbers, there may not be an all-inclusive IEEE type, in which case this message will BLAST. The only IEEE values which this will return are those that represent real numbers. I.e., no NANs, no inifinities, no negative zero.


asIEEE64

public abstract double asIEEE64()
Returns the value as IEEE64 (double precision). The only IEEE values which this will return are those that represent real numbers. I.e., no NANs, no inifinities, no negative zero.


precision

public abstract int precision()
What precision is it, in terms of the number of bits used to represent it. In the interests of efficiency, this may return a number larger than that *needed* to represent it. However, the precision reported must be at least that needed to represent this number. It is assumed that the format of the number satisfies the IEEE radix independent floating point spec. Should we represent real numbers other that those representable in IEEE, the meaning of this message will be more fully specified. The fact that this message is allowed to overestimate precision doesn't interfere with equality: a->isEqual(b) exactly when they represent that same real number, even if one of them happens to overestimate precision more that the other.


sendSelfTo

public void sendSelfTo(Xmtr xmtr)
Overrides:
sendSelfTo in class Heaper

make

public static RealPos make(double value)
make an XuReal given an IEEE floating point number of whatever precision on this platform is able to hold all the real numbers currently representable by an XuReal. Currently this is IEEE64 (double precision), but may be redeclared as a larger IEEE precision in the future. See comment in XuReal::makeIEEE64


makeIEEE32

public static RealPos makeIEEE32(float value)
See comment in XuReal::makeIEEE64


makeIEEE64

public static RealPos makeIEEE64(double value)
Returns an XuReal which exactly represents the same real number that is represented by 'value'. BLASTs if value doesn't represent a real (i.e., no NANs or inifinities). Negative 0 will be silently converted to positive zero


info

public static void info()
{PrimFloat CLIENT} value


exportName

public static java.lang.String exportName()


Copyright © 2003 David G Jones. All Rights Reserved.
Original Udanax-Gold - Copyright © 1979-1999 Udanax.com. All rights reserved.