Cluster explanation of what Cluster is and/or does


Inherits from: Object


More detailed prose description of Cluster.


See also: Object [some other help files]


Some Important Issues Regarding Cluster (optional)


Explanation of the issues. For more information see Nil and [some other help files].


Creation / Class Methods


*applyN (func, clusterObjects)

Short prose description of method.

func - Explanation of func. Default value is nil. Other information.

clusterObjects - Explanation of clusterObjects. Default value is [ ]. Other information.

// inline example

g = Cluster.applyN;

g.doSomething; // explanation

g.cleanUpMethod;



*fromArray (array, oclass)

Short prose description of method.

array - Explanation of array. Default value is nil. Other information.

oclass - Explanation of oclass. Default value is nil. Other information.

// inline example

g = Cluster.fromArray;

g.doSomething; // explanation

g.cleanUpMethod;



*new (array, oclass)

Short prose description of method.

array - Explanation of array. Default value is nil. Other information.

oclass - Explanation of oclass. Default value is nil. Other information.

// inline example

g = Cluster.new;

g.doSomething; // explanation

g.cleanUpMethod;



*expandArray (array, clusterObject)

Short prose description of method.

array - Explanation of array. Default value is nil. Other information.

clusterObject - Explanation of clusterObject. Default value is nil. Other information.

// inline example

g = Cluster.expandArray;

g.doSomething; // explanation

g.cleanUpMethod;



*searchArrayForCluster (array)

Short prose description of method.

array - Explanation of array. Default value is nil. Other information.

// inline example

g = Cluster.searchArrayForCluster;

g.doSomething; // explanation

g.cleanUpMethod;



Accessing Instance and Class Variables

oclass

Explanation including the type of oclass and a link to its help file.

Default value is nil.

items

Explanation including the type of items and a link to its help file.

Default value is nil.

Doing Some Task (optional)


A short bit of prose explaining something about the task.

prDo (selector, args)

Short prose description of method.

selector - Explanation of selector. Default value is nil. Other information.

args - Explanation of args. Default value is nil. Other information.

// inline example

g = Cluster.prDo;

g.doSomething; // explanation

g.cleanUpMethod;



prCollect (selector, args)

Short prose description of method.

selector - Explanation of selector. Default value is nil. Other information.

args - Explanation of args. Default value is nil. Other information.

// inline example

g = Cluster.prCollect;

g.doSomething; // explanation

g.cleanUpMethod;



prCollectSimple (selector)

Short prose description of method.

selector - Explanation of selector. Default value is nil. Other information.

// inline example

g = Cluster.prCollectSimple;

g.doSomething; // explanation

g.cleanUpMethod;



prDoArray (selector, argArray)

Short prose description of method.

selector - Explanation of selector. Default value is nil. Other information.

argArray - Explanation of argArray. Default value is nil. Other information.

// inline example

g = Cluster.prDoArray;

g.doSomething; // explanation

g.cleanUpMethod;



prCollectArray (selector, argArray)

Short prose description of method.

selector - Explanation of selector. Default value is nil. Other information.

argArray - Explanation of argArray. Default value is nil. Other information.

// inline example

g = Cluster.prCollectArray;

g.doSomething; // explanation

g.cleanUpMethod;



prExpand (args)

Short prose description of method.

args - Explanation of args. Default value is nil. Other information.

// inline example

g = Cluster.prExpand;

g.doSomething; // explanation

g.cleanUpMethod;



prExpandDo (selector, args)

Short prose description of method.

selector - Explanation of selector. Default value is nil. Other information.

args - Explanation of args. Default value is nil. Other information.

// inline example

g = Cluster.prExpandDo;

g.doSomething; // explanation

g.cleanUpMethod;



prExpandCollect (selector, args)

Short prose description of method.

selector - Explanation of selector. Default value is nil. Other information.

args - Explanation of args. Default value is nil. Other information.

// inline example

g = Cluster.prExpandCollect;

g.doSomething; // explanation

g.cleanUpMethod;



prCheckSize (clusterobject)

Short prose description of method.

clusterobject - Explanation of clusterobject. Default value is nil. Other information.

// inline example

g = Cluster.prCheckSize;

g.doSomething; // explanation

g.cleanUpMethod;



doesNotUnderstand (selector, args)

Short prose description of method.

selector - Explanation of selector. Default value is nil. Other information.

args - Explanation of args. Default value is [ ]. Other information.

// inline example

g = Cluster.doesNotUnderstand;

g.doSomething; // explanation

g.cleanUpMethod;



dopost

Short prose description of method.

// inline example

g = Cluster.dopost;

g.doSomething; // explanation

g.cleanUpMethod;



printOn (stream)

Short prose description of method.

stream - Explanation of stream. Default value is nil. Other information.

// inline example

g = Cluster.printOn;

g.doSomething; // explanation

g.cleanUpMethod;



clApply (func)

Short prose description of method.

func - Explanation of func. Default value is nil. Other information.

// inline example

g = Cluster.clApply;

g.doSomething; // explanation

g.cleanUpMethod;



Examples


// instance creation by passing an array of items all of the same class

e = Cluster([1,2,3]);



//a method call on a Cluster instance is passed on to all elements of the items array and returned in another Cluster instance

// this will only work for methods not implemented by Object

a = Cluster([Point(2,3),Point(4,5)]);

a.rho

//clApply applies the function to all elements of the Cluster and returns another Cluster

a = Cluster([Point(2,3),Point(4,5)]);

a.clApply(_+Point(5,6))


//applyN applies the function to the elements of the Cluster instances passed as args, on a row by row basis.

b = Cluster([Point(6,3),Point(2,5)]);

Cluster.applyN(Rect(_,_,100,300),a,b)


//if one of the arguments to applyN is a Cluster with less items than one of the other Cluster objects than it just uses it's first item repeated. 

a = Cluster([Point(2,3),Point(4,5)])

b = Cluster([Point(6,3)]);

Cluster.applyN(Rect(_,_,100,300),a,b)


//if one of the arguments to applyN is not a Cluster then it is applied unchaged to all elements.

a = Cluster([Point(2,3),Point(4,5),Point(6,3)]);

b = 2;

Cluster.applyN(_*_,a,b)