Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Tiago Peixoto
graph-tool
Commits
c40c24bd
Commit
c40c24bd
authored
Mar 07, 2011
by
Tiago Peixoto
Browse files
Improve quick start guide and include documentation for GraphView
parent
d9f7b784
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
doc/price.py
View file @
c40c24bd
...
...
@@ -72,7 +72,7 @@ savefig("deg-hist.png")
# just for fun.
v
=
g
.
vertex
(
randint
(
0
,
g
.
num_vertices
()))
for
i
in
xrange
(
0
,
100
)
:
while
True
:
print
"vertex:"
,
v
,
"in-degree:"
,
v
.
in_degree
(),
"out-degree:"
,
\
v
.
out_degree
(),
"age:"
,
v_age
[
v
]
...
...
@@ -86,11 +86,10 @@ for i in xrange(0, 100):
v
=
n_list
[
randint
(
0
,
len
(
n_list
))]
# let's save our graph for posterity. We want to save the age properties as
# well... To do this, they must become "internal" properties
, as such
:
# well... To do this, they must become "internal" properties:
g
.
vertex_properties
[
"age"
]
=
v_age
g
.
edge_properties
[
"age"
]
=
e_age
# now we can save it
g
.
save
(
"price.xml.gz"
)
doc/quickstart.rst
View file @
c40c24bd
This diff is collapsed.
Click to expand it.
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