...
Info | ||
---|---|---|
| ||
You will have to think about how you are going to implement your algorithm. One possible architecture is to divide the work of the algorithm into sub-algorithms, called phases. This makes it easy to provide different implementations of phases that result in different kinds of tree layouts. KLay Layered uses this approach. You can find some documentation about this approach on its Confluence page. Further information can be found in a paper we just wrote, but haven't published yet. If you are interested in reading it, feel free to ask for a copy of the paper. Remember: This will probably not be the only possibility for structuring your algorithm. Also remember: What starts with a first small and simple implementation will grow into a much more complex algorithm, with possibilities for customizing the result and different kinds of layouts that are computed. Design your architecture with this kind of complexity in mind. Feel free to talk to us once you've settled on an architecture. |
MrTGraph Data Structure
...
title | The data structure |
---|
The MrTGraph data structure is best explained by looking at the following diagram:
The basic data structure constis of the three classes TNode, TGraph and TEdge, which contain all the necessary properties to model a tree data structure. Therefore a TGraph consits of sets of TEdges and TNodes.
The TNodes are objects of the type TShape. That means that a nodes' size and position is defined by the attributes defined in the class TShape. The class TShape is an abstract superclass for the class TGraphElement. So the class TGrahpElement provides the utilites to declare any generic graph element of which a TGraph consits of.
Since an input KGraph is transformed into a TGraph, so that our algorithms can work on that TGraph, we do want to have the opportunity to set specific properties on graph elements. That is what the class TGraphElement is for. This specific way of implementation allows us not to model every property itself, but to model a class which can set an abritrary amount of properties on the graphs' elements. This data structure provides all the needs to perform a transformation from a KGraph to a TGraph that is as easy and therefore as evident as possible.
Features
Info | ||
---|---|---|
| ||
The bottom line is to develop an algorithm that lays out a graph in a tree layout. Here a some first ideas for further features you might look into.
Feel free to think about further ways to enhance the algorithm. Make sure to set priorities and to properly divide responsibilities among the team members. |
...