Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
graph-tool
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
43
Issues
43
List
Boards
Labels
Service Desk
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Tiago Peixoto
graph-tool
Commits
371d3b75
Commit
371d3b75
authored
Mar 21, 2012
by
Tiago Peixoto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix initial placement of arf_layout()
parent
cc6a4ca2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
src/graph_tool/draw/__init__.py
src/graph_tool/draw/__init__.py
+5
-5
No files found.
src/graph_tool/draw/__init__.py
View file @
371d3b75
...
...
@@ -298,10 +298,7 @@ def arf_layout(g, weight=None, d=0.5, a=10, dt=0.001, epsilon=1e-6,
"""
if
pos
is
None
:
if
dim
!=
2
:
pos
=
random_layout
(
g
,
dim
=
dim
)
else
:
pos
=
graph_draw
(
g
,
output
=
None
)
pos
=
random_layout
(
g
,
dim
=
dim
)
_check_prop_vector
(
pos
,
name
=
"pos"
,
floating
=
True
)
ug
=
GraphView
(
g
,
directed
=
False
)
...
...
@@ -362,7 +359,10 @@ def _propagate_pos(g, cg, c, cc, cpos, delta, mivs):
def
_avg_edge_distance
(
g
,
pos
):
return
libgraph_tool_layout
.
avg_dist
(
g
.
_Graph__graph
,
_prop
(
"v"
,
g
,
pos
))
ad
=
libgraph_tool_layout
.
avg_dist
(
g
.
_Graph__graph
,
_prop
(
"v"
,
g
,
pos
))
if
numpy
.
isnan
(
ad
):
ad
=
1.
return
ad
def
coarse_graphs
(
g
,
method
=
"hybrid"
,
mivs_thres
=
0.9
,
ec_thres
=
0.75
,
...
...
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