RTGradualDSM

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

RTGradualDSM

abergel
Hi All!


We have introduced RTGradualDSM in Roassal.
Simple example on numerical values:
=-=-=-==-=-=-==-=-=-==-=-=-==-=-=-=
  dsm := RTGradualDSM new.

    values := { 1->#(2 3 1 5 6) . 2 -> #(1 2 1 1 1 1 4) . 3 -> #(1 2 5 3 2) . 4 -> #(2 5 1) . 5 -> #() . 6 -> #(4) } asDictionary.
    dsm objects: (1 to: 6).
    dsm score: [ :assoc | (values at: assoc key) occurrencesOf: assoc value ].
    dsm
=-=-=-==-=-=-==-=-=-==-=-=-==-=-=-=



Example showing code authorship in the Glamour application:
=-=-=-==-=-=-==-=-=-==-=-=-==-=-=-=
 classes := GLMLoggedObject withAllSubclasses.

    classesToAuthors := (classes collect: [ :cls | cls -> ((cls methods collect: #author) asSet sortedAs: #yourself) ]) asDictionary.
    authors := (classesToAuthors values flatCollect: #yourself) asSet sortedAs: #yourself.
    authorsToClasses := (authors collect: [ :anAuthor | anAuthor -> (classesToAuthors associations select: [ :as | as value includes: anAuthor ] thenCollect: #key) ]) asDictionary.

    b := RTGradualDSM new.
    b objectsX: classes.
    b objectsY: authors.
    b score: [ :assoc | (assoc value methods collect: #author) occurrencesOf: assoc key ].
    b 
=-=-=-==-=-=-==-=-=-==-=-=-==-=-=-=



Merry Christmas to all!

Cheers,
Alexandre

-- 
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.




_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.list.inf.unibe.ch/listinfo/moose-dev