LayoutLibrary - A C++ Library to Layout Clustred Graphs
Features
- Supports 4 layouting algorithms for clustred graphs
- Hierarchical Layout
- Force Directed Layout
- Grid Based Layout
- Circular Layout
- Can be used to lay out biological networks
- Accepts graph represented using standard GraphML format
- Consideres the following factors while layouting the graph:
- Crossing-number of drawing
- Node-node overlaps
- Area of a drawing
- Drawing Symmetry
- Angular resolution
What's Different
- Supports clustered graphs with support for clusters hierarchy.
- Allows the nodes in graph to have different sizes. Avoids overlap of nodes.
- Uses standard GraphML format to store layout related information in a graph.
Building this library
- Make sure Qt Creator (version 3.1.2) with Qt (version 5.3.1) is installed.
- Download Boost version 1.55.0 and place it on D drive. (like D:\boost_1_55_0)
- Open GraphLayout.pro as project with Qt Creator.
- Run Qmake command on GraphLayout.pro
- Run Build command on GraphLayout.pro
- You might encounter build error on an intermediate file
moc_MainWindow.cpp at line 178. Simply comment the line (with //) and save.
- Run Build command again on GraphLayout.pro.
- Upon successful build of client and library use Run command to start execution of Graph Layout Library Client.
Using the layout library
- Include 'GraphLayoutLibrary.dll' in your project
Include the 'LayoutManager.h' in your code
#include <LayoutManager/LayoutManager.h>
Create object of class 'LayoutManager'
LayoutManager layoutManager;
Call methods of 'LayoutManager' class to get layout for a given graph
layoutManager.applyCircularLayout(<input_graphML_file_path>, <output_graphML_file_path>, <vertex_order>);
layoutManager.applyGridBasedLayout(<input_graphML_file_path>, <output_graphML_file_path>);
...
layoutManager.applyForceDirectedLayout(<input_graphML_file_path>, <output_graphML_file_path>, <iteration_count>);
...
layoutManager.applyHierarchicalLayout(<input_graphML_file_path>, <output_graphML_file_path>);
Parameters:
- input_graphML_file_path : String containing path of input GraphML file
- output_graphML_file_path : String containing path of generated GraphML file
- vertex_order : Enum of type 'LayoutEnum::VertexOrderCriteria'. Defines the ordering criterion for nodes. Can have values 'LayoutEnum::VertexOrderCriteria::DefaultOrder' / 'LayoutEnum::VertexOrderCriteria::TopologicalOrder' / 'LayoutEnum::VertexOrderCriteria::ConnectedComponentOrder'
- iteration_count : Integer count for which the Fore Directed Layout steps are to be applied
Note: These methods may throw 'LayoutException' and 'boost::exception' in case of unexpected conditions.
Documentation
Please check the API documentation under 'Documentation' folder to know more about the APIs.
Contributors
Noopur Landge, Pritish Dubey, Vrushali Inamdar, Vivek Kulkarni
Demo
Please check the sample demo application 'GraphLayoutLibraryClient.exe' present under 'Demo' folder to view the layout algorithms in action. It also contains SBML to GraphML converter.