AdjacencyMatrixImport Class Reference
[Import]
List of all members.
Detailed Description
AdjacencyMatrixImport.cpp - Import a graph coded with matrix.
This plugin enables to import a graph coded with a matrix
File format:
The input format of this plugin is an ascii file where each line represents a row of the matrix. In each row, cells must be separated by a space.
Let M(i,j) be a cell of the matrix :
- if i==j we define the value of a node.
- if i!=j we define a directed edge between node[i] and node[j]
If M(i,j) is real value (0, .0, -1, -1.0), it is stored in the viewMetric property of the graph.
If M(i,j) is a string, it is stored in the viewLabel property of the graph.
If M(i,j) == @ an edge will be created without value
If M(i,j) == # no edge will be created between node[i] and node[j]
EXEMPLE 1 :
A
# B
# # C
Define a graph with 3 nodes (with labels A B C) and without edge.
EXEMPLE 2 :
A
@ B
@ @ C
Define a simple complete graph with 3 nodes (with labels A B C) and no label (or value) on its edges
EXEMPLE 3 :
A # 5
@ B
# @ C
Define a graph with 3 nodes and 3 edges, the edge between A and C has the value 5
HISTORY
Version 0.1: 14 February: First version replace old adjacency matrix format included in Tulip (no more supported)
TODO :
Add tests in order to prevent bad file format.
- Author:
- David Auber University of Bordeaux I (LaBRI) France
Email:auber@tulip-software.org
LICENCE
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
Public Member Functions
Public Attributes
Constructor & Destructor Documentation
AdjacencyMatrixImport::AdjacencyMatrixImport |
( |
ClusterContext |
context |
) |
[inline] |
|
AdjacencyMatrixImport::~AdjacencyMatrixImport |
( |
|
) |
[inline] |
|
Member Function Documentation
bool AdjacencyMatrixImport::import |
( |
const string & |
name |
) |
[inline] |
|
Member Data Documentation
|