Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
gs-algo
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
graphstream
gs-algo
Commits
75a393ec
Commit
75a393ec
authored
Jul 11, 2012
by
Antoine
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changed Layout tests.
parent
b0f904e2
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
67 additions
and
7 deletions
+67
-7
src-test/org/graphstream/ui/layout/test/DemoLayout.java
src-test/org/graphstream/ui/layout/test/DemoLayout.java
+12
-5
src-test/org/graphstream/ui/layout/test/data/dolphins.gml
src-test/org/graphstream/ui/layout/test/data/dolphins.gml
+0
-1
src-test/org/graphstream/ui/layout/test/data/fourComponents.dgs
...st/org/graphstream/ui/layout/test/data/fourComponents.dgs
+55
-0
src-test/org/graphstream/ui/layout/test/data/polbooks.gml
src-test/org/graphstream/ui/layout/test/data/polbooks.gml
+0
-1
No files found.
src-test/org/graphstream/ui/layout/test/DemoLayout.java
View file @
75a393ec
...
...
@@ -32,20 +32,28 @@
package
org.graphstream.ui.layout.test
;
import
java.io.IOException
;
import
org.graphstream.algorithm.generator.BarabasiAlbertGenerator
;
import
org.graphstream.algorithm.generator.Generator
;
import
org.graphstream.algorithm.generator.GridGenerator
;
import
org.graphstream.graph.ElementNotFoundException
;
import
org.graphstream.graph.Graph
;
import
org.graphstream.graph.implementations.MultiGraph
;
import
org.graphstream.stream.GraphParseException
;
public
class
DemoLayout
{
public
static
void
main
(
String
args
[])
{
public
static
void
main
(
String
args
[])
throws
ElementNotFoundException
,
IOException
,
GraphParseException
{
//System.getProperties().put("gs.ui.layout", "org.graphstream.ui.layout.springbox.implementations.LinLog");
(
new
DemoLayout
()).
test
();
}
public
void
test
()
{
public
void
test
()
throws
ElementNotFoundException
,
IOException
,
GraphParseException
{
Graph
graph
=
new
MultiGraph
(
"test"
);
graph
.
display
();
graph
.
addAttribute
(
"layout.stabilization-limit"
,
1
);
graph
.
addAttribute
(
"layout.quality"
,
3
);
graph
.
addAttribute
(
"layout.gravity"
,
0.01
);
// int steps = 50;
// Generator gen = new BarabasiAlbertGenerator(2);
// int steps = 6;
...
...
@@ -58,9 +66,8 @@ public class DemoLayout {
// sleep(10);
// }
// gen.end();
try
{
graph
.
read
(
"src-test/org/graphstream/ui/layout/test/data/WorldImport1999.edge"
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
// try { graph.write("grid7x7.dgs"); } catch(Exception e) { }
graph
.
display
();
graph
.
read
(
"src-test/org/graphstream/ui/layout/test/data/fourComponents.dgs"
);
// graph.read("src-test/org/graphstream/ui/layout/test/data/polbooks.gml");
}
public
static
void
sleep
(
long
ms
)
{
...
...
src-test/org/graphstream/ui/layout/test/data/dolphins.gml
View file @
75a393ec
Creator "Mark Newman on Wed Jul 26 15:04:20 2006"
graph
[
directed 0
...
...
src-test/org/graphstream/ui/layout/test/data/fourComponents.dgs
0 → 100644
View file @
75a393ec
DGS004
null 0 0
an "0"
an "1"
an "2"
an "3"
an "10"
an "11"
an "12"
an "13"
an "20"
an "21"
an "22"
an "23"
an "30"
an "31"
an "32"
an "33"
ae "0-1" "0" "1"
ae "0-2" "0" "2"
ae "0-3" "0" "3"
ae "1-2" "1" "2"
ae "1-3" "1" "3"
ae "2-3" "2" "3"
ae "10-11" "10" "11"
ae "10-12" "10" "12"
ae "10-13" "10" "13"
ae "11-12" "11" "12"
ae "11-13" "11" "13"
ae "12-13" "12" "13"
ae "20-11" "20" "21"
ae "20-12" "20" "22"
ae "20-13" "20" "23"
ae "21-12" "21" "22"
ae "21-13" "21" "23"
ae "22-13" "22" "23"
ae "30-31" "30" "31"
ae "30-32" "30" "32"
ae "30-33" "30" "33"
ae "31-32" "31" "32"
ae "31-33" "31" "33"
ae "32-33" "32" "33"
#ae "inter1" "0" "10"
#ae "inter2" "10" "20"
#ae "inter3" "20" "30"
#ae "inter4" "30" "0"
src-test/org/graphstream/ui/layout/test/data/polbooks.gml
View file @
75a393ec
Creator "Mark Newman on Wed Oct 18 16:42:04 2006"
graph
[
directed 0
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment