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
Moose-dev(a)iam.unibe.ch
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."