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
40
Issues
40
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
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
8af15810
Commit
8af15810
authored
Dec 26, 2010
by
Tiago Peixoto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Correct documentation typos
parent
42ff7e36
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
11 deletions
+10
-11
src/graph_tool/centrality/__init__.py
src/graph_tool/centrality/__init__.py
+7
-7
src/graph_tool/community/__init__.py
src/graph_tool/community/__init__.py
+3
-4
No files found.
src/graph_tool/centrality/__init__.py
View file @
8af15810
...
...
@@ -51,7 +51,7 @@ __all__ = ["pagerank", "betweenness", "central_point_dominance", "eigentrust",
"trust_transitivity"
]
def
pagerank
(
g
,
damping
=
0.8
,
prop
=
None
,
epslon
=
1e-6
,
max_iter
=
None
,
def
pagerank
(
g
,
damping
=
0.8
,
prop
=
None
,
eps
i
lon
=
1e-6
,
max_iter
=
None
,
ret_iter
=
False
):
r
"""
Calculate the PageRank of each vertex.
...
...
@@ -64,7 +64,7 @@ def pagerank(g, damping=0.8, prop=None, epslon=1e-6, max_iter=None,
Damping factor.
prop : :class:`~graph_tool.PropertyMap`, optional (default: None)
Vertex property map to store the PageRank values.
epslon : float, optional (default: 1e-6)
eps
i
lon : float, optional (default: 1e-6)
Convergence condition. The iteration will stop if the total delta of all
vertices are below this value.
max_iter : int, optional (default: None)
...
...
@@ -97,7 +97,7 @@ def pagerank(g, damping=0.8, prop=None, epslon=1e-6, max_iter=None,
the out-degree of w, and d is a damping factor.
The implemented algorithm progressively iterates the above condition, until
it no longer changes, according to the parameter epslon. It has a
it no longer changes, according to the parameter eps
i
lon. It has a
topology-dependent running time.
If enabled during compilation, this algorithm runs in parallel.
...
...
@@ -140,7 +140,7 @@ def pagerank(g, damping=0.8, prop=None, epslon=1e-6, max_iter=None,
if
prop
==
None
:
prop
=
g
.
new_vertex_property
(
"double"
)
ic
=
libgraph_tool_centrality
.
\
get_pagerank
(
g
.
_Graph__graph
,
_prop
(
"v"
,
g
,
prop
),
damping
,
epslon
,
get_pagerank
(
g
.
_Graph__graph
,
_prop
(
"v"
,
g
,
prop
),
damping
,
eps
i
lon
,
max_iter
)
if
ret_iter
:
return
prop
,
ic
...
...
@@ -310,7 +310,7 @@ def central_point_dominance(g, betweenness):
_prop
(
"v"
,
g
,
betweenness
))
def
eigentrust
(
g
,
trust_map
,
vprop
=
None
,
norm
=
False
,
epslon
=
1e-6
,
max_iter
=
0
,
def
eigentrust
(
g
,
trust_map
,
vprop
=
None
,
norm
=
False
,
eps
i
lon
=
1e-6
,
max_iter
=
0
,
ret_iter
=
False
):
r
"""
Calculate the eigentrust centrality of each vertex in the graph.
...
...
@@ -326,7 +326,7 @@ def eigentrust(g, trust_map, vprop=None, norm=False, epslon=1e-6, max_iter=0,
Vertex property map where the values of eigentrust must be stored.
norm : bool, optional (default: false)
Norm eigentrust values so that the total sum equals 1.
epslon : float, optional (default: 1e-6)
eps
i
lon : float, optional (default: 1e-6)
Convergence condition. The iteration will stop if the total delta of all
vertices are below this value.
max_iter : int, optional (default: None)
...
...
@@ -403,7 +403,7 @@ def eigentrust(g, trust_map, vprop=None, norm=False, epslon=1e-6, max_iter=0,
vprop
=
g
.
new_vertex_property
(
"double"
)
i
=
libgraph_tool_centrality
.
\
get_eigentrust
(
g
.
_Graph__graph
,
_prop
(
"e"
,
g
,
trust_map
),
_prop
(
"v"
,
g
,
vprop
),
epslon
,
max_iter
)
_prop
(
"v"
,
g
,
vprop
),
eps
i
lon
,
max_iter
)
if
norm
:
vprop
.
get_array
()[:]
/=
sum
(
vprop
.
get_array
())
...
...
src/graph_tool/community/__init__.py
View file @
8af15810
...
...
@@ -53,8 +53,7 @@ def community_structure(g, n_iter, n_spins, gamma=1.0, corr="erdos",
spins
=
None
,
weight
=
None
,
t_range
=
(
100.0
,
0.01
),
verbose
=
False
,
history_file
=
None
):
r
"""
Obtain the community structure for the given graph, used a Potts model
approach.
Obtain the community structure for the given graph, using a Potts model approach.
Parameters
----------
...
...
@@ -192,8 +191,8 @@ def community_structure(g, n_iter, n_spins, gamma=1.0, corr="erdos",
References
----------
.. [reichard-statistical-2006] Joerg Reichardt and Stefan Bornholdt,
"Statistical Mechanics of Community Detection", Phys. Rev. E 74
(2006)
016110, :doi:`10.1103/PhysRevE.74.016110`, :arxiv:`cond-mat/0603718`
"Statistical Mechanics of Community Detection", Phys. Rev. E 74
016110
(2006)
, :doi:`10.1103/PhysRevE.74.016110`, :arxiv:`cond-mat/0603718`
.. [newman-modularity-2006] M. E. J. Newman, "Modularity and community
structure in networks", Proc. Natl. Acad. Sci. USA 103, 8577-8582 (2006),
:doi:`10.1073/pnas.0601602103`, :arxiv:`physics/0602124`
...
...
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