Index - All Packages - All Categories - All Classes

Class MuArray

The class XuArray is intended to model zero-based arrays with integer keys (indices).

This makes them like the array primitive in C and C++. There is an additional constraint, which is they are to have simple domains. Therefore they should not be constructed with non-contiguous sections. This is not currently enforced. Given that it is enforced, an XuArray with count N would have as its domain exactly the integers from 0 to N-1.

There is some controversy over whether XuArray should be a type and enforce this contraint (by BLASTing if an attempt is made to violate the constraint), or whether XuArray is just a specialized implementation for when an IntegerTable happens to meet this constraint; in which case it should "become" a more general implementation when an attempt is made to violate the constraint (see "Type Safe Become"). In the latter case, XuArray will probably be made a private class as well. Please give us your opinion.

XuArray provides no additional protocol.

Package: Udanax-Gold
All Superclasses: Object Heaper ScruTable MuTable IntegerTable
Immediate Subclasses: ActualArray
Protocols: Object
Categories: Xanadu-Collection-Tables

Class Methods

array

A new empty XnArray

array: obj0

A new XnArray initialized with a single element, 'obj0', stored at index 0.

array: obj0 with: obj1

A new XnArray initialized with a two elements stored at indicies 0 and 1.

array: obj0 with: obj1 with: obj2

A new XuArray initialized with a three elements stored at indicies 0, 1, and 2.

array: obj0 with: obj1 with: obj2 with: obj3


arrayAccumulator

Returns an Accumulator which will produce an XuArray of the elements
accumulated into it in order of accumulation. See XuArray. Equivalent to
'tableAccumulator()'. Eventually either he or I should be declared obsolete.

arrayAccumulator: onArray

An accumulator which will accumulate by appending elements onto the end of
'onArray'. It is an error for anyone else to modify 'onArray' between creating
this accumulator and accumulating into it. acc->value() will return 'onArray'
itself.

makeIntegerVar: someSize

'someSize' is a hint about how big we should expect the array to need to grow.

Overrides: IntegerTable class

offsetScruArray: array with: dsp

The resulting ScruTable is a view onto 'array'. It is a view in which each key
is offset by 'dsp' from where it is in 'array'. By saying it is a view, we mean
that as 'array' is modified, the view tracks the changes.

Instance Methods

at: key store: value



Overrides: IntegerTable
Overridden by: ActualArray

atInt: key store: value



Overrides: IntegerTable
Overridden by: ActualArray

coordinateSpace



Overrides: IntegerTable
Overridden by: ActualArray

copy



Overrides: IntegerTable
Overridden by: ActualArray

count



Overrides: IntegerTable
Overridden by: ActualArray

domain



Overrides: IntegerTable
Overridden by: ActualArray

emptySize: size



Overrides: IntegerTable
Overridden by: ActualArray

fetch: key



Overrides: IntegerTable
Overridden by: ActualArray

highestIndex



Overrides: IntegerTable
Overridden by: ActualArray

includesIntKey: aKey



Overrides: IntegerTable

includesKey: aKey



Overrides: IntegerTable

intFetch: key



Overrides: IntegerTable
Overridden by: ActualArray

intWipe: anIdx



Overrides: IntegerTable
Overridden by: ActualArray

isEmpty



Overrides: IntegerTable
Overridden by: ActualArray

lowestIndex



Overrides: IntegerTable
Overridden by: ActualArray

offsetSubTableBetween: startIndex with: stopIndex with: firstIndex



Overrides: IntegerTable
Overridden by: ActualArray

runAt: key



Overrides: IntegerTable
Overridden by: ActualArray

runAtInt: key



Overrides: IntegerTable
Overridden by: ActualArray

stepper: order

Return a stepper on this table.

Overrides: IntegerTable
Overridden by: ActualArray

subTable: region



Overrides: IntegerTable
Overridden by: ActualArray

subTableBetween: startLoc with: endLoc



Overrides: IntegerTable
Overridden by: ActualArray

theOne



Overrides: ScruTable

transformedBy: dsp



Overrides: ScruTable

wipe: key



Overrides: IntegerTable
Overridden by: ActualArray

wipeAll: region

I 'wipe' from myself all associations whose key
is in 'region'. See MuTable::wipe

Overrides: MuTable


Index - All Packages - All Categories - All Classes