------------------------------
Message: 9 Date: Sun, 1 Jul 2007 21:34:15 +0200 From: St?phane Ducasse stephane.ducasse@univ-savoie.fr Subject: [Moose-dev] distribution map in 6 lines? To: Moose-dev Bugs moose-dev@iam.unibe.ch Message-ID: EA9BA9AA-35AF-4157-B64F-77C5E5E20381@univ-savoie.fr Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed
Andrea where can I find the distribution map code you show me (how to write a distribution map in 6 lines of code
------------------------------
Hi,
Presuming you were referring to me, it's Adrian and not Andrea :) The code is in my bundle MoosLiDevelopment, but because it is only 3 lines i've extracted it below:
| engine serializedCollection |
engine := ClusterEngine with: aCollection using: distanceBlock. engine hierarchicalClusteringShowProgressUsing: #averageLinkage. serializedCollection := engine dendrogram collect: #yourself.
where: aCollection: is your collection of elements you want to cluster distanceBlock: is a block that returns the distance between any 2 elements of your collection (eg. Euclidean distance for numerical proprieties of elements) serializedCollection := the result of the clustering, the serialized version of the collection
Sorry for the late answer, but i was away for a few days.
Ciao, Adi
Hi,
For the visualization, suppose you can get an order of containers and for each container you get an ordered set of elements. Also, suppose the you can ask the element for an identifying property. In this case, the code would look like:
| identityColor | identityColor := IdentityNormalizer withCommand: [:eachElement | eachElement identifyingProperty]. view nodes: containers forEach: [:each | view newShape rectangle; fillColor: identityColor; withBorder. view nodes: each elements. view gridLayout. ]. view gridLayout
The IdentityNormalizer returns a color based on the identity of the object returned by the block.
Cheers, Doru
On Jul 4, 2007, at 12:44 PM, Adrian DOZSA wrote:
Message: 9 Date: Sun, 1 Jul 2007 21:34:15 +0200 From: St?phane Ducasse stephane.ducasse@univ-savoie.fr Subject: [Moose-dev] distribution map in 6 lines? To: Moose-dev Bugs moose-dev@iam.unibe.ch Message-ID: EA9BA9AA-35AF-4157-B64F-77C5E5E20381@univ-savoie.fr Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed
Andrea where can I find the distribution map code you show
me (how to write a distribution map in 6 lines of code
Hi,
Presuming you were referring to me, it's Adrian and not Andrea :) The code is in my bundle MoosLiDevelopment, but because it is only 3 lines i've extracted it below:
| engine serializedCollection | engine := ClusterEngine with: aCollection using: distanceBlock. engine hierarchicalClusteringShowProgressUsing: #averageLinkage. serializedCollection := engine dendrogram collect: #yourself.
where: aCollection: is your collection of elements you want to cluster distanceBlock: is a block that returns the distance between any 2 elements of your collection (eg. Euclidean distance for numerical proprieties of elements) serializedCollection := the result of the clustering, the serialized version of the collection
Sorry for the late answer, but i was away for a few days.
Ciao, Adi
-- Adrian DOZSA Politehnica University of Timisoara Computer Science Department mail: adi.dozsa@gmail.com web: http://adi.dozsa.googlepages.com/ _______________________________________________ Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
-- www.iam.unibe.ch/~girba www.iam.unibe.ch/~girba/blog/
"No matter how many recipes we'll know, we'll still value a chef."