Index - All Packages - All Categories - All Classes

Class OrderSpec

[documentation note: we need to hide the documentation about partial orders, but still warn that the orders may become partial]. An OrderSpec for a given coordinate space represents a partial ordering of all the Positions of that coordinate space. The fundamental ordering relationship is "follows". The response of Positions to isGE defines the natural, "ascending" partial order among the positions. Every coordinate space will have at least this ascending and the corresponding descending OrderSpecs. OrderSpecs are useful to specify in what order a stepper produced for stepping over positions should do so.

Package: Udanax-Gold
All Superclasses: Object Heaper
Immediate Subclasses: CrossOrderSpec IDUpOrder IntegerUpOrder RealUpOrder ReverseOrder SequenceUpOrder
Protocols: Object
Categories: Xanadu-Spaces-Basic

Class Methods

ascending: cs

Use CoordinateSpace::fetch/getAscending

descending: cs

Use CoordinateSpace::fetch/getDescending

infostProtocol



Overridden by: CrossOrderSpec class

Instance Methods

actualHashForEqual



Overridden by: CrossOrderSpec IDUpOrder IntegerUpOrder RealUpOrder ReverseOrder SequenceUpOrder

arrange: region

Return an Arrangement of the positions in region according to the ordering of the receiver.

Overridden by: IDUpOrder IntegerUpOrder RealUpOrder SequenceUpOrder

compare: x with: y

Say what the relative ordering relationship is between x and y

coordinateSpace

Essential. Like Positions, Dsps, and XuRegions, an OrderSpec is specific to one coordinate space. It is an error to use the generic protocol on objects from different coordinate spaces.

Overridden by: CrossOrderSpec IDUpOrder IntegerUpOrder RealUpOrder ReverseOrder SequenceUpOrder

createRcvr: receiver



Overridden by: CrossOrderSpec IDUpOrder IntegerUpOrder RealUpOrder ReverseOrder SequenceUpOrder

export


follows: x with: y

Essential. Compare the two and return true if x is known to follow y in the ordering. This message is the 'greater than or equal to' equivalent for this ordering. It must have those properties a mathematician would demand of a '>=' on a partial order:
os->follows(a, a) (reflexivity)
os->follows(a, b) && os->follows(b, c) implies os->follows(a, c) (transitivity)
os->follows(a, b) && os->follows(b, a) implies a->isEqual(b) (what's the name for this?)

Overridden by: CrossOrderSpec IDUpOrder IntegerUpOrder RealUpOrder ReverseOrder SequenceUpOrder

followsInt: x with: y

See discussion in XuInteger class comment about boxed vs unboxed integers

Overridden by: IntegerUpOrder ReverseOrder

isEqual: other



Overridden by: CrossOrderSpec IDUpOrder IntegerUpOrder RealUpOrder ReverseOrder SequenceUpOrder

isFullOrder


isFullOrder: keys

Essential. If this returns TRUE, then I define a full order over all positions in 'keys' (or all positions in the space if 'keys' is nil). However, if I return FALSE, that doesn't guarantee that I don't define a full ordering. I may happen to define a full ordering without knowing it.

A full ordering is one in which for each a, b in keys; either this->follows(a, b) or this->follows(b, a).

Overridden by: CrossOrderSpec IDUpOrder IntegerUpOrder RealUpOrder ReverseOrder SequenceUpOrder

preceeds: before with: after

Return true if some position in before is less than or equal to all positions in after.

Overridden by: CrossOrderSpec IDUpOrder IntegerUpOrder RealUpOrder ReverseOrder SequenceUpOrder

reversed

Returns an OrderSpec representing the mirror image of my ordering.
o->follows(a, b) iff o->reverse()->follows(b, a)

Overridden by: ReverseOrder

sendSelfTo: xmtr



Overridden by: CrossOrderSpec IDUpOrder IntegerUpOrder RealUpOrder ReverseOrder SequenceUpOrder


Index - All Packages - All Categories - All Classes