[ENH] Mondrian builder

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

[ENH] Mondrian builder

abergel
Hi!

I am slowly integrating feature of the GraphBuilder into the (new) Mondrian builder. Normalizer and the partition are supported by RTMondrian now.

Here is a small example:
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
classes := RTLayout withAllSubclasses, RTBuilder withAllSubclasses, RTShape withAllSubclasses.

b := RTMondrian new.
b shape circle size: 5.
b nodes: classes.
b edges connectFrom: #superclass.

b normalizer
objects: classes;
normalizeSize: #numberOfMethods min: 5 max: 30;
normalizeColor: #numberOfLinesOfCode using: { Color green . Color red } using: #sqrt.


b layout
for: [ :c | c includesBehavior: RTLayout ] use: RTForceBasedLayout new;
for: [ :c | c includesBehavior: RTBuilder ] use: RTForceBasedLayout new;
for: [ :c | c includesBehavior: RTShape ] use: RTForceBasedLayout new;
flow.
b
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

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




_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: [ENH] Mondrian builder

Tudor Girba-2
Pretty nice!

Thanks for pushing this.

About normalizer: as it is now, the computation related to setting the values for each property is O(n^2) because you will look up the node for each element in the objects collection. That is why I would prefer it to also have it as part of the shape definition (where it anyway belongs at the end) because that is an O(n) operation.

Cheers,
Doru



On Sun, Dec 7, 2014 at 4:02 PM, Alexandre Bergel <[hidden email]> wrote:
Hi!

I am slowly integrating feature of the GraphBuilder into the (new) Mondrian builder. Normalizer and the partition are supported by RTMondrian now.

Here is a small example:
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
classes := RTLayout withAllSubclasses, RTBuilder withAllSubclasses, RTShape withAllSubclasses.

b := RTMondrian new.
b shape circle size: 5.
b nodes: classes.
b edges connectFrom: #superclass.

b normalizer
objects: classes;
normalizeSize: #numberOfMethods min: 5 max: 30;
normalizeColor: #numberOfLinesOfCode using: { Color green . Color red } using: #sqrt.


b layout
for: [ :c | c includesBehavior: RTLayout ] use: RTForceBasedLayout new;
for: [ :c | c includesBehavior: RTBuilder ] use: RTForceBasedLayout new;
for: [ :c | c includesBehavior: RTShape ] use: RTForceBasedLayout new;
flow.
b
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

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




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




--

"Every thing has its own flow"

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: [ENH] Mondrian builder

abergel
Something like that maybe:

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
classes := RTLayout withAllSubclasses, RTBuilder withAllSubclasses, RTShape withAllSubclasses.
b := RTMondrian new.
b shape circle
        size: 5;
        normalizeAgainst: classes;
        normalizeSize: #numberOfMethods min: 5 max: 30;
        normalizeColor: #numberOfLinesOfCode using: { Color green . Color red } using: #sqrt.

b nodes: classes.
b edges connectFrom: #superclass.
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

??
Opinion?

Alexandre


> On Dec 7, 2014, at 3:05 PM, Tudor Girba <[hidden email]> wrote:
>
> Pretty nice!
>
> Thanks for pushing this.
>
> About normalizer: as it is now, the computation related to setting the values for each property is O(n^2) because you will look up the node for each element in the objects collection. That is why I would prefer it to also have it as part of the shape definition (where it anyway belongs at the end) because that is an O(n) operation.
>
> Cheers,
> Doru
>
>
>
> On Sun, Dec 7, 2014 at 4:02 PM, Alexandre Bergel <[hidden email]> wrote:
> Hi!
>
> I am slowly integrating feature of the GraphBuilder into the (new) Mondrian builder. Normalizer and the partition are supported by RTMondrian now.
>
> Here is a small example:
> <Screen Shot 2014-12-07 at 12.01.59 PM.png>
> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
> classes := RTLayout withAllSubclasses, RTBuilder withAllSubclasses, RTShape withAllSubclasses.
>
> b := RTMondrian new.
> b shape circle size: 5.
> b nodes: classes.
> b edges connectFrom: #superclass.
>
> b normalizer
> objects: classes;
> normalizeSize: #numberOfMethods min: 5 max: 30;
> normalizeColor: #numberOfLinesOfCode using: { Color green . Color red } using: #sqrt.
>
>
> b layout
> for: [ :c | c includesBehavior: RTLayout ] use: RTForceBasedLayout new;
> for: [ :c | c includesBehavior: RTBuilder ] use: RTForceBasedLayout new;
> for: [ :c | c includesBehavior: RTShape ] use: RTForceBasedLayout new;
> flow.
> b
> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
>
> Cheers,
> Alexandre
> --
> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
> Alexandre Bergel  http://www.bergel.eu
> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>
>
>
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
>
>
>
> --
> www.tudorgirba.com
>
> "Every thing has its own flow"
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev

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




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