org.abora.gold.tumbler
Class RealPos

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

public class RealPos
extends Position

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


Field Summary
 
Fields inherited from class org.abora.gold.xpp.basic.Heaper
AllBlasts, BecomeMap, GarbageCount, InGC, InitializedClasses, InitializingClasses, LastMemory, NextClientRequestNumber, NotOneElementSignal, PackageTable, PromiseNameTable, StringHashSBoxes
 
Fields inherited from class org.abora.gold.java.AboraHeaper
ActiveClubs, CurrentAuthor, CurrentBertCanopyCache, CurrentBertCrum, CurrentChunk, CurrentGrandMap, CurrentKeyMaster, CurrentPacker, CurrentSensorCanopyCache, CurrentServer, CurrentSession, CurrentSessions, CurrentTrace, InitialEditClub, InitialOwner, InitialReadClub, InitialSponsor, InsideTransactionFlag
 
Constructor Summary
RealPos(Rcvr receiver)
           
 
Method Summary
 int actualHashForEqual()
          since we redefine equal, subclasses had better redefine actualHashForEqual
 double asIEEE()
          Returns the value as IEEE basic data type is big enough to hold any value which can be put
into an XuReal.
 double asIEEE64()
          Returns the value as IEEE64 (double precision).
The only IEEE values which this will return are those that represent real numbers.
 XnRegion asRegion()
          Essential.
 CoordinateSpace coordinateSpace()
          Essential.
 IntegerVar exponent()
           
static java.lang.String exportName()
          Return the completely stripped rootName for this class.
static void info()
          {PrimFloat CLIENT} value
 boolean isEqual(Heaper other)
          Return true if the two objects are equal.
 boolean isGE(Position other)
          OBSOLETE.
 boolean isIEEE()
          Whether the real number that this object represents is exactly representable in an
available IEEE precision.
static Heaper 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'.
static RealPos makeIEEE8(IEEE8 value)
          See comment in XuReal::makeIEEE64
 IntegerVar mantissa()
          This number represents exactly this->mantissa() * 2 ^ this->exponent().
 int precision()
          What precision is it, in terms of the number of bits used to represent it.
 void sendSelfTo(Xmtr xmtr)
          do nothing
 PrimFloatValue value()
          Essential.
 
Methods inherited from class org.abora.gold.spaces.basic.Position
isAfterOrEqual
 
Methods inherited from class org.abora.gold.xpp.basic.Heaper
abstractDeclarationFor, abstractTypeFor, addMethodAttributeToInOf, addPackage, addPackageCategory, allClientProtocolOn, argumentTypesFor, arrow, blast, blast, BLAST, cachePromiseNameTable, cachePromiseNameTableIn, canYouBecome, cast, cleanPromiseClasses, cleanupGarbage, clientClassesDo, clientFunctionsOn, clientMethodsOn, clientProtocol, clientProtocolDo, clientProtocolOn, clientProtocolOn, collectibleClasses, compare, compileClientSubclasses, compileConstantPromiseMethods, compileCreateFromRcvr, compileEQ, compileGeneratedClassMethod, compileGeneratedMethod, compileHook, compilePromise, compilePromiseDefaultMethods, compilePromiseFluidDeclarations, compilePromiseHandlers, compilePromiseMethods, compileRequestCreateMsgInArguments, compileRequestEvaluateMsgInReturningArguments, compileRPCSpecialistEvaluateMsgForReturningArguments, compileSendSelfTo, compileSendSelfToSendHook, compileStubbleMethods, compileSubclassStubbleMethods, computeMangle, computePreorder, constantTypeValue, convert, convertCopyDeclarations, convertDeferredDeclarations, convertProxyDeclarations, convertSubclassCopyDeclarations, convertSubclassDeferredDeclarations, convertSubclassProxyDeclarations, copyReferencesToType, create, create, create, create, create, create, create, create, create, create, createRequestClassArguments, definesProxyMethods, delete, deref, destroy, destruct, destructor, enum, enumFlags, equals, fetchAttribute, fetchPackage, fetchSuperCategory, fileOutClientProtocol, findCategory, findSenderAndReceiverMethods, findTailInto, flushPromiseNameTable, foo, freezeClientClasses, freezeClientProtocol, freezeStProtocol, frozenClasses, garbageCollect, garbageCollectFrom, gcOpportunity, gcOpportunity, generatedCategory, generatePromiseNames, getCategory, getOrMakePackage, getSuperCategory, handlerSignaturesFrom, hash, hashForEqual, hasProxyMethods, info_clientClasses, info_clientSideClasses, info_promiseClasses, info_stProtocol, inGC, initializedClasses, initializingClasses, initPackages, initStringHashSBoxes, inspectPieces, instanceSize, IntegerVar, isByProxy, isConstructed, isDestructed, isEqualOrSubclassOf, isGenerated, isIntType, isKindOf, isRawType, isUnlocked, linkTimeNonInherited, make, makeClassTable, makeFillTable, makeRequestTable, mangle, markChildren, markCount, markInstances, mayBecome, mayBecomeAnySubclassOf, new1, newX, nonCopyVariables, notWorking, pack, packageClasses, packagingCategory, parseExportName, passe, pointerToStaticMember, pointerToStaticMember, pointerToVirtualMember, preorderMax, preorderNumber, printOn, PROBLEM, problems, promiseClass, promiseDefaultValue, promiseName, promiseNameTable, promiseToAbstract, registerPackageCategory, removeGeneratedCode, removeStubbleMethods, removeSubclassGeneratedCode, removeSubclassStubbleMethods, requestProcedure, requestProceduresFrom, returnTypeFor, rootName, scheduleTermination, sendProxyTo, serverNameFor, setGC, signal, signals, smalltalkSelector, stClientProtocol, stubbleSelectorTokenReturnsArguments, subclassNonCopyVariables, takeOop, togglePromiseName, togglePromiseOfParse, unimplemented, unmangle, verifyFreeze, wipeStubble
 
Methods inherited from class org.abora.gold.java.AboraHeaper
asOop, basicInspect, displayString, error, hack, halt, inspect, knownBug, mightNotImplement, REQUIRES, shouldImplement, shouldNotImplement, stubbleForSubclassResponsibility, thingToDo, willNotImplement
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

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.

Overrides:
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.

Overrides:
coordinateSpace in class Position

value

public 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.

Overrides:
isEqual in class Position

isGE

public boolean isGE(Position other)
Description copied from class: Position
OBSOLETE. Use the OrderSpec, or non-polymorphic subclass methods.
Defines a transitive partial order; return false if incompatible. See OrderSpec::follows
for the properties a partial order must satisfy. The ordering according to isGE is the
same as the ascending OrderSpec for this coordinate space. It is probably better to use
the OrderSpec than this message.

Overrides:
isGE in class Position

exponent

public IntegerVar exponent()

isIEEE

public boolean isIEEE()
Whether the real number that this object represents is exactly representable in an
available IEEE precision. Currently the answer is always TRUE, and the available
precisions are 8 (stupid precision), 32 (single precision), and 64 (double precision). If
the answer is FALSE, the meaning of the messages 'precision' and 'asIEEE' remain to be
defined.


mantissa

public IntegerVar mantissa()
This number represents exactly this->mantissa() * 2 ^ this->exponent(). Should we
eventually support real numbers which cannot be expressed exactly with integral mantissa
and exponent, then this message (and 'exponent') will BLAST for such numbers.


asIEEE

public 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 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 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)
Description copied from class: Heaper
do nothing

Overrides:
sendSelfTo in class Heaper

make

public static Heaper 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


makeIEEE8

public static RealPos makeIEEE8(IEEE8 value)
See comment in XuReal::makeIEEE64


info

public static void info()
{PrimFloat CLIENT} value


exportName

public static java.lang.String exportName()
Description copied from class: Heaper
Return the completely stripped rootName for this class. Get rid of prefixes.
Some classes will implement this directly in order to provide another name.



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