graph algorithms

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

graph algorithms

Tudor Girba
Hi,

I am looking into the Moose-Algos-Graph package. It's pretty cool,  
especially that you can create graphs easily.

The only problem I encountered so far is that I cannot create nested  
graphs.

I just see now that MOGraphStructure is a subclass of MOGraphAlgorithm  
and that MOGraphAlgorithm has nodes and edges. This means that these  
can handle only one level of nodes and edges.

This problem was solved in Mondrian by making each node or edge a  
graph. Using a similar approach, MOGraphAlgorithm could then just  
point to one root node that holds everything.

Or maybe we need a MOGraphBuilder that creates the graph and  
MOGraphAlgorithm just deals with a set of nodes and edges.

What do you think?

Cheers,
Doru



--
www.tudorgirba.com

"It's not what we do that matters most, it's how we do it."

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

Re: graph algorithms

Simon Denier-3

On 5 mai 2010, at 12:22, Tudor Girba wrote:

> Hi,
>
> I am looking into the Moose-Algos-Graph package. It's pretty cool, especially that you can create graphs easily.
>
> The only problem I encountered so far is that I cannot create nested graphs.
>
> I just see now that MOGraphStructure is a subclass of MOGraphAlgorithm and that MOGraphAlgorithm has nodes and edges. This means that these can handle only one level of nodes and edges.
>
> This problem was solved in Mondrian by making each node or edge a graph. Using a similar approach, MOGraphAlgorithm could then just point to one root node that holds everything.
>
> Or maybe we need a MOGraphBuilder that creates the graph and MOGraphAlgorithm just deals with a set of nodes and edges.
>
> What do you think?


I am not sure I understand the use case? The main idea behind this library is that you have a model which is already some kind of graph (possibly nested), then to run algorithms  efficiently you have to inject your model into a graph with dedicated data structures (MOGraphNode, MOGraphEdge and subclasses). For now, I haven't dealt with algorithms which solve problems with nested graphs.

--
 Simon




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

Re: graph algorithms

Tudor Girba
Hi,

Right now, the MOGraphAlgorithm is responsible for two things:
- graph creation
- algorithm

I am suggesting to decouple these because so that the graph creation  
can be reused in other contexts. Once we have a graph we should be  
able to pass it to the algorithm we want.

For example, the Mondrian figures could reuse the creation and the  
Mondrian layouts could reuse the algorithm. In a similar way, I am now  
playing with another graph structure given by architectural  
descriptions and I could reuse those parts.

Cheers,
Doru

On 5 May 2010, at 12:53, Simon Denier wrote:

>
> On 5 mai 2010, at 12:22, Tudor Girba wrote:
>
>> Hi,
>>
>> I am looking into the Moose-Algos-Graph package. It's pretty cool,  
>> especially that you can create graphs easily.
>>
>> The only problem I encountered so far is that I cannot create  
>> nested graphs.
>>
>> I just see now that MOGraphStructure is a subclass of  
>> MOGraphAlgorithm and that MOGraphAlgorithm has nodes and edges.  
>> This means that these can handle only one level of nodes and edges.
>>
>> This problem was solved in Mondrian by making each node or edge a  
>> graph. Using a similar approach, MOGraphAlgorithm could then just  
>> point to one root node that holds everything.
>>
>> Or maybe we need a MOGraphBuilder that creates the graph and  
>> MOGraphAlgorithm just deals with a set of nodes and edges.
>>
>> What do you think?
>
>
> I am not sure I understand the use case? The main idea behind this  
> library is that you have a model which is already some kind of graph  
> (possibly nested), then to run algorithms  efficiently you have to  
> inject your model into a graph with dedicated data structures  
> (MOGraphNode, MOGraphEdge and subclasses). For now, I haven't dealt  
> with algorithms which solve problems with nested graphs.
>
> --
> Simon
>
>
>
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev

--
www.tudorgirba.com

"Problem solving should be concentrated on describing
the problem in a way that is relevant for the solution."



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

Re: graph algorithms

Simon Denier-3

On 5 mai 2010, at 13:14, Tudor Girba wrote:

> Hi,
>
> Right now, the MOGraphAlgorithm is responsible for two things:
> - graph creation
> - algorithm

OK that sounds better. Indeed, that's one question I asked myself a long time ago. I decided to go with one class fits all usage to keep the API in a single class. But if there is a need to use the graph builder outside, it would be good to decouple MOGraphStructure (and rename it to MOGraphBuilder then).

I will add an issue.


>
> I am suggesting to decouple these because so that the graph creation can be reused in other contexts. Once we have a graph we should be able to pass it to the algorithm we want.
>
> For example, the Mondrian figures could reuse the creation and the Mondrian layouts could reuse the algorithm. In a similar way, I am now playing with another graph structure given by architectural descriptions and I could reuse those parts.
>
> Cheers,
> Doru
>
> On 5 May 2010, at 12:53, Simon Denier wrote:
>
>>
>> On 5 mai 2010, at 12:22, Tudor Girba wrote:
>>
>>> Hi,
>>>
>>> I am looking into the Moose-Algos-Graph package. It's pretty cool, especially that you can create graphs easily.
>>>
>>> The only problem I encountered so far is that I cannot create nested graphs.
>>>
>>> I just see now that MOGraphStructure is a subclass of MOGraphAlgorithm and that MOGraphAlgorithm has nodes and edges. This means that these can handle only one level of nodes and edges.
>>>
>>> This problem was solved in Mondrian by making each node or edge a graph. Using a similar approach, MOGraphAlgorithm could then just point to one root node that holds everything.
>>>
>>> Or maybe we need a MOGraphBuilder that creates the graph and MOGraphAlgorithm just deals with a set of nodes and edges.
>>>
>>> What do you think?
>>
>>
>> I am not sure I understand the use case? The main idea behind this library is that you have a model which is already some kind of graph (possibly nested), then to run algorithms  efficiently you have to inject your model into a graph with dedicated data structures (MOGraphNode, MOGraphEdge and subclasses). For now, I haven't dealt with algorithms which solve problems with nested graphs.
>>
>> --
>> Simon
>>
>>
>>
>>
>> _______________________________________________
>> Moose-dev mailing list
>> [hidden email]
>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
> --
> www.tudorgirba.com
>
> "Problem solving should be concentrated on describing
> the problem in a way that is relevant for the solution."
>
>
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev

--
 Simon




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

Re: graph algorithms

Alexandre Bergel-4
In reply to this post by Tudor Girba
Side note: would it be possible to give a prefix different than 'MO'?  
I find this a little confusing.

Cheers,
Alexandre

On 5 May 2010, at 06:22, Tudor Girba wrote:

> Hi,
>
> I am looking into the Moose-Algos-Graph package. It's pretty cool,  
> especially that you can create graphs easily.
>
> The only problem I encountered so far is that I cannot create nested  
> graphs.
>
> I just see now that MOGraphStructure is a subclass of  
> MOGraphAlgorithm and that MOGraphAlgorithm has nodes and edges. This  
> means that these can handle only one level of nodes and edges.
>
> This problem was solved in Mondrian by making each node or edge a  
> graph. Using a similar approach, MOGraphAlgorithm could then just  
> point to one root node that holds everything.
>
> Or maybe we need a MOGraphBuilder that creates the graph and  
> MOGraphAlgorithm just deals with a set of nodes and edges.
>
> What do you think?
>
> Cheers,
> Doru
>
>
>
> --
> www.tudorgirba.com
>
> "It's not what we do that matters most, it's how we do it."
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev

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

Re: graph algorithms

Simon Denier-3

On 5 mai 2010, at 15:08, Alexandre Bergel wrote:

> Side note: would it be possible to give a prefix different than 'MO'? I find this a little confusing.


Yes, should be done.


>
> Cheers,
> Alexandre
>
> On 5 May 2010, at 06:22, Tudor Girba wrote:
>
>> Hi,
>>
>> I am looking into the Moose-Algos-Graph package. It's pretty cool, especially that you can create graphs easily.
>>
>> The only problem I encountered so far is that I cannot create nested graphs.
>>
>> I just see now that MOGraphStructure is a subclass of MOGraphAlgorithm and that MOGraphAlgorithm has nodes and edges. This means that these can handle only one level of nodes and edges.
>>
>> This problem was solved in Mondrian by making each node or edge a graph. Using a similar approach, MOGraphAlgorithm could then just point to one root node that holds everything.
>>
>> Or maybe we need a MOGraphBuilder that creates the graph and MOGraphAlgorithm just deals with a set of nodes and edges.
>>
>> What do you think?
>>
>> Cheers,
>> Doru
>>
>>
>>
>> --
>> www.tudorgirba.com
>>
>> "It's not what we do that matters most, it's how we do it."
>>
>> _______________________________________________
>> Moose-dev mailing list
>> [hidden email]
>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev

--
 Simon




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

Re: graph algorithms

Alexandre Bergel-4

http://code.google.com/p/moose-technology/issues/detail?id=395
-=-=-=-=-=-=-=-=-=
Classes defined in Moose-Algos-Graph should have a prefix different  
than MO. It is particularly confusing since Mondrian uses this prefix.
-=-=-=-=-=-=-=-=-=

Cheers,
Alexandre

On 5 May 2010, at 09:11, Simon Denier wrote:

>
> On 5 mai 2010, at 15:08, Alexandre Bergel wrote:
>
>> Side note: would it be possible to give a prefix different than  
>> 'MO'? I find this a little confusing.
>
>
> Yes, should be done.
>
>
>>
>> Cheers,
>> Alexandre
>>
>> On 5 May 2010, at 06:22, Tudor Girba wrote:
>>
>>> Hi,
>>>
>>> I am looking into the Moose-Algos-Graph package. It's pretty cool,  
>>> especially that you can create graphs easily.
>>>
>>> The only problem I encountered so far is that I cannot create  
>>> nested graphs.
>>>
>>> I just see now that MOGraphStructure is a subclass of  
>>> MOGraphAlgorithm and that MOGraphAlgorithm has nodes and edges.  
>>> This means that these can handle only one level of nodes and edges.
>>>
>>> This problem was solved in Mondrian by making each node or edge a  
>>> graph. Using a similar approach, MOGraphAlgorithm could then just  
>>> point to one root node that holds everything.
>>>
>>> Or maybe we need a MOGraphBuilder that creates the graph and  
>>> MOGraphAlgorithm just deals with a set of nodes and edges.
>>>
>>> What do you think?
>>>
>>> Cheers,
>>> Doru
>>>
>>>
>>>
>>> --
>>> www.tudorgirba.com
>>>
>>> "It's not what we do that matters most, it's how we do it."
>>>
>>> _______________________________________________
>>> Moose-dev mailing list
>>> [hidden email]
>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>
>> _______________________________________________
>> Moose-dev mailing list
>> [hidden email]
>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
> --
> Simon
>
>
>
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev

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