On 5 mai 2010, at 13:14, Tudor Girba wrote:
Right now, the MOGraphAlgorithm is responsible for two things:
- graph creation
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
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.
On 5 May 2010, at 12:53, Simon Denier wrote:
> On 5 mai 2010, at 12:22, Tudor Girba wrote:
>> 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
>> 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.
> Moose-dev mailing list
"Problem solving should be concentrated on describing
the problem in a way that is relevant for the solution."
Moose-dev mailing list