igraph 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/History.txt +3 -0
- data/License.txt +504 -0
- data/Manifest.txt +24 -0
- data/README.txt +47 -0
- data/ext/cIGraph.c +160 -0
- data/ext/cIGraph.h +60 -0
- data/ext/cIGraph_add_delete.c +219 -0
- data/ext/cIGraph_basic_properties.c +34 -0
- data/ext/cIGraph_basic_query.c +260 -0
- data/ext/cIGraph_error_handlers.c +13 -0
- data/ext/cIGraph_iterators.c +135 -0
- data/ext/cIGraph_operators.c +9 -0
- data/ext/cIGraph_selectors.c +93 -0
- data/ext/cIGraph_shortest_paths.c +112 -0
- data/ext/cIGraph_utility.c +56 -0
- data/ext/extconf.rb +12 -0
- data/test/tc_add_delete.rb +49 -0
- data/test/tc_basic_properties.rb +10 -0
- data/test/tc_basic_query.rb +54 -0
- data/test/tc_create.rb +11 -0
- data/test/tc_error_handling.rb +10 -0
- data/test/tc_iterators.rb +44 -0
- data/test/tc_selectors.rb +14 -0
- data/test/tc_shortest_paths.rb +21 -0
- data/test/test_all.rb +12 -0
- metadata +75 -0
@@ -0,0 +1,14 @@
|
|
1
|
+
require 'test/unit'
|
2
|
+
require 'igraph'
|
3
|
+
|
4
|
+
class TestGraph < Test::Unit::TestCase
|
5
|
+
def test_select_all
|
6
|
+
graph = IGraph.new(['A','B','C','D'],true)
|
7
|
+
assert_equal ['A','B','C','D'], graph.all_vertices
|
8
|
+
assert_equal ['A','B','C','D'], graph.vertices
|
9
|
+
end
|
10
|
+
def test_adj
|
11
|
+
graph = IGraph.new(['A','B','C','D'],true)
|
12
|
+
assert_equal ['B'], graph.adjacent_vertices('A',IGraph::ALL)
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
require 'test/unit'
|
2
|
+
require 'igraph'
|
3
|
+
|
4
|
+
class TestGraph < Test::Unit::TestCase
|
5
|
+
def test_shortest_paths
|
6
|
+
graph = IGraph.new(['A','B','C','D'],true)
|
7
|
+
m = graph.shortest_paths(['A'],IGraph::ALL)
|
8
|
+
assert_equal 1, m[0][1]
|
9
|
+
assert_equal 0, m[0][0]
|
10
|
+
assert_equal graph.vcount, m[0].size
|
11
|
+
assert_equal nil, m[0][2]
|
12
|
+
end
|
13
|
+
|
14
|
+
def test_get_shortest_paths
|
15
|
+
graph = IGraph.new(['A','B','C','D'],true)
|
16
|
+
m = graph.get_shortest_paths('A',['B','C'],IGraph::ALL)
|
17
|
+
assert_equal ['A','B'], m[0]
|
18
|
+
assert_equal [], m[1]
|
19
|
+
end
|
20
|
+
|
21
|
+
end
|
data/test/test_all.rb
ADDED
@@ -0,0 +1,12 @@
|
|
1
|
+
#Tests all test cases for rsruby
|
2
|
+
|
3
|
+
require 'test/unit'
|
4
|
+
|
5
|
+
require 'tc_create'
|
6
|
+
require 'tc_iterators'
|
7
|
+
require 'tc_selectors'
|
8
|
+
require 'tc_add_delete'
|
9
|
+
require 'tc_basic_query'
|
10
|
+
require 'tc_basic_properties'
|
11
|
+
require 'tc_error_handling'
|
12
|
+
require 'tc_shortest_paths'
|
metadata
ADDED
@@ -0,0 +1,75 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
rubygems_version: 0.9.2
|
3
|
+
specification_version: 1
|
4
|
+
name: igraph
|
5
|
+
version: !ruby/object:Gem::Version
|
6
|
+
version: 0.1.1
|
7
|
+
date: 2007-07-05 00:00:00 +09:00
|
8
|
+
summary: IGraph
|
9
|
+
require_paths:
|
10
|
+
- test
|
11
|
+
email: alexg@kuicr.kyoto-u.ac.jp
|
12
|
+
homepage: http://igraph.rubyforge.org/
|
13
|
+
rubyforge_project: igraph
|
14
|
+
description: IGraph
|
15
|
+
autorequire:
|
16
|
+
default_executable:
|
17
|
+
bindir: bin
|
18
|
+
has_rdoc: true
|
19
|
+
required_ruby_version: !ruby/object:Gem::Version::Requirement
|
20
|
+
requirements:
|
21
|
+
- - ">"
|
22
|
+
- !ruby/object:Gem::Version
|
23
|
+
version: 0.0.0
|
24
|
+
version:
|
25
|
+
platform: ruby
|
26
|
+
signing_key:
|
27
|
+
cert_chain:
|
28
|
+
post_install_message:
|
29
|
+
authors:
|
30
|
+
- Alex Gutteridge
|
31
|
+
files:
|
32
|
+
- History.txt
|
33
|
+
- License.txt
|
34
|
+
- Manifest.txt
|
35
|
+
- README.txt
|
36
|
+
- ext/cIGraph.c
|
37
|
+
- ext/cIGraph.h
|
38
|
+
- ext/cIGraph_add_delete.c
|
39
|
+
- ext/cIGraph_basic_properties.c
|
40
|
+
- ext/cIGraph_basic_query.c
|
41
|
+
- ext/cIGraph_error_handlers.c
|
42
|
+
- ext/cIGraph_iterators.c
|
43
|
+
- ext/cIGraph_operators.c
|
44
|
+
- ext/cIGraph_selectors.c
|
45
|
+
- ext/cIGraph_shortest_paths.c
|
46
|
+
- ext/cIGraph_utility.c
|
47
|
+
- test/tc_add_delete.rb
|
48
|
+
- test/tc_basic_properties.rb
|
49
|
+
- test/tc_basic_query.rb
|
50
|
+
- test/tc_create.rb
|
51
|
+
- test/tc_error_handling.rb
|
52
|
+
- test/tc_iterators.rb
|
53
|
+
- test/tc_selectors.rb
|
54
|
+
- test/tc_shortest_paths.rb
|
55
|
+
- test/test_all.rb
|
56
|
+
test_files:
|
57
|
+
- test/test_all.rb
|
58
|
+
rdoc_options:
|
59
|
+
- --exclude
|
60
|
+
- test/*
|
61
|
+
- --main
|
62
|
+
- README.txt
|
63
|
+
- --inline-source
|
64
|
+
extra_rdoc_files:
|
65
|
+
- README.txt
|
66
|
+
- History.txt
|
67
|
+
- License.txt
|
68
|
+
executables: []
|
69
|
+
|
70
|
+
extensions:
|
71
|
+
- ext/extconf.rb
|
72
|
+
requirements: []
|
73
|
+
|
74
|
+
dependencies: []
|
75
|
+
|