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
39
Issues
39
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
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
b54e1a83
Commit
b54e1a83
authored
Nov 06, 2015
by
Tiago Peixoto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replace 'N' by 'V' in docstrings, when referring to number of nodes
This improves the consistency in the documentation.
parent
a5fd88ec
Pipeline
#70
passed with stage
Changes
5
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
26 additions
and
28 deletions
+26
-28
src/graph_tool/__init__.py
src/graph_tool/__init__.py
+4
-4
src/graph_tool/centrality/__init__.py
src/graph_tool/centrality/__init__.py
+8
-8
src/graph_tool/community/blockmodel.py
src/graph_tool/community/blockmodel.py
+3
-3
src/graph_tool/community/nested_blockmodel.py
src/graph_tool/community/nested_blockmodel.py
+8
-10
src/graph_tool/generation/__init__.py
src/graph_tool/generation/__init__.py
+3
-3
No files found.
src/graph_tool/__init__.py
View file @
b54e1a83
...
...
@@ -1843,7 +1843,7 @@ class Graph(object):
.. note::
If the option ``fast == False`` is given, this operation is
:math:`O(
N
+ E)` (this is the default). Otherwise it is
:math:`O(
V
+ E)` (this is the default). Otherwise it is
:math:`O(k + k_{\text{last}})`, where :math:`k` is the (total)
degree of the vertex being deleted, and :math:`k_{\text{last}}` is
the (total) degree of the vertex with the largest index.
...
...
@@ -2587,13 +2587,13 @@ class Graph(object):
If the option ``in_place == True`` is given, the algorithm will remove
the filtered vertices and re-index all property maps which are tied with
the graph. This is a slow operation which has an :math:`O(
N
^2)`
the graph. This is a slow operation which has an :math:`O(
V
^2)`
complexity.
If ``in_place == False``, the graph and its vertex and edge property
maps are temporarily copied to a new unfiltered graph, which will
replace the contents of the original graph. This is a fast operation
with an :math:`O(
N
+ E)` complexity. This is the default behaviour if no
with an :math:`O(
V
+ E)` complexity. This is the default behaviour if no
option is given.
.. note :
...
...
@@ -2679,7 +2679,7 @@ class Graph(object):
.. note::
If the vertices are being filtered, and ``ignore_filter == False``,
this operation is :math:`O(
N
)`. Otherwise it is :math:`O(1)`.
this operation is :math:`O(
V
)`. Otherwise it is :math:`O(1)`.
"""
return
self
.
__graph
.
get_num_vertices
(
not
ignore_filter
)
...
...
src/graph_tool/centrality/__init__.py
View file @
b54e1a83
...
...
@@ -394,11 +394,11 @@ def closeness(g, weight=None, source=None, vprop=None, norm=True, harmonic=False
If ``norm == True``, the values of :math:`c_i` are normalized by
:math:`n_i-1` where :math:`n_i` is the size of the (out-) component of
:math:`i`. If ``harmonic == True``, they are instead simply normalized by
:math:`
N
-1`.
:math:`
V
-1`.
The algorithm complexity of :math:`O(
N(N
+ E))` for unweighted graphs and
:math:`O(
N(N+E) \log N
)` for weighted graphs. If the option ``source`` is
specified, this drops to :math:`O(
N + E)` and :math:`O((N+E)\log N
)`
The algorithm complexity of :math:`O(
V(V
+ E))` for unweighted graphs and
:math:`O(
V(v+E) \log V
)` for weighted graphs. If the option ``source`` is
specified, this drops to :math:`O(
V + E)` and :math:`O((V+E)\log V
)`
respectively.
If enabled during compilation, this algorithm runs in parallel.
...
...
@@ -1079,11 +1079,11 @@ def trust_transitivity(g, trust_map, source=None, target=None, vprop=None):
maximum weight, using Dijkstra's algorithm, to all in-neighbours of a given
target. This search needs to be performed repeatedly for every target, since
it needs to be removed from the graph first. For each given source, the
resulting complexity is therefore :math:`O(
N^2\log N
)` for all targets, and
:math:`O(
N\log N
)` for a single target. For a given target, the complexity
for obtaining the trust from all given sources is :math:`O(k
N\log N
)`, where
resulting complexity is therefore :math:`O(
V^2\log V
)` for all targets, and
:math:`O(
V\log V
)` for a single target. For a given target, the complexity
for obtaining the trust from all given sources is :math:`O(k
V\log V
)`, where
:math:`k` is the in-degree of the target. Thus, the complexity for obtaining
the complete trust matrix is :math:`O(E
N\log N
)`, where :math:`E` is the
the complete trust matrix is :math:`O(E
V\log V
)`, where :math:`E` is the
number of edges in the network.
If enabled during compilation, this algorithm runs in parallel.
...
...
src/graph_tool/community/blockmodel.py
View file @
b54e1a83
...
...
@@ -1649,7 +1649,7 @@ def multilevel_minimize(state, B, nsweeps=10, adaptive_sweeps=True, epsilon=0,
the :func:`mcmc_sweep` moves, at different scales. See [peixoto-efficient-2014]_
for more details.
This algorithm has a complexity of :math:`O(
N\ln^2 N)`, where :math:`N
` is the
This algorithm has a complexity of :math:`O(
V\ln^2 V)`, where :math:`V
` is the
number of nodes in the network.
Examples
...
...
@@ -2102,8 +2102,8 @@ def minimize_blockmodel_dl(g, deg_corr=True, overlap=False, ec=None,
one-dimensional Fibonacci search on :math:`B`. See
[peixoto-parsimonious-2013]_ and [peixoto-efficient-2014]_ for more details.
This algorithm has a complexity of :math:`O(\tau
N
\ln^2 B_{\text{max}})`,
where :math:`
N
` is the number of nodes in the network, :math:`\tau` is the
This algorithm has a complexity of :math:`O(\tau
V
\ln^2 B_{\text{max}})`,
where :math:`
V
` is the number of nodes in the network, :math:`\tau` is the
mixing time of the MCMC, and :math:`B_{\text{max}}` is the maximum number of
blocks considered. If :math:`B_{\text{max}}` is not supplied, it is computed
as :math:`\sim\sqrt{E}` via :func:`get_max_B`, in which case the complexity
...
...
src/graph_tool/community/nested_blockmodel.py
View file @
b54e1a83
...
...
@@ -919,10 +919,9 @@ def nested_tree_sweep(state, min_B=None, max_B=None, max_b=None, nsweeps=10,
This algorithm performs a constrained agglomerative heuristic on each level
of the network, via the function :func:`~graph_tool.community.multilevel_minimize`.
This algorithm has worst-case complexity of :math:`O(N\ln^2 N \times L)`,
where :math:`N` is the number of nodes in the network, and :math:`L` is
the depth of the hierarchy.
"""
This algorithm has worst-case complexity of :math:`O(V\ln^2 V \times L)`,
where :math:`V` is the number of nodes in the network, and :math:`L` is the
depth of the hierarchy. """
dl_ent
=
kwargs
.
get
(
"dl_ent"
,
False
)
...
...
@@ -1102,10 +1101,9 @@ def init_nested_state(g, Bs, ec=None, deg_corr=True, overlap=False,
This algorithm performs an agglomerative heuristic on each level of the
network, via the function :func:`~graph_tool.community.multilevel_minimize`.
This algorithm has worst-case complexity of :math:`O(N\ln^2 N \times L)`,
where :math:`N` is the number of nodes in the network, and :math:`L` is
the depth of the hierarchy.
"""
This algorithm has worst-case complexity of :math:`O(V\ln^2 V \times L)`,
where :math:`V` is the number of nodes in the network, and :math:`L` is the
depth of the hierarchy. """
dl_ent
=
kwargs
.
get
(
"dl_ent"
,
False
)
ignore_degrees
=
kwargs
.
get
(
"ignore_degrees"
,
None
)
...
...
@@ -1376,8 +1374,8 @@ def minimize_nested_blockmodel_dl(g, Bs=None, bs=None, min_B=None, max_B=None,
See [peixoto-hierarchical-2014]_ for details on the algorithm.
This algorithm has a complexity of :math:`O(
N \ln^2 N)`, where :math:`N`
is
the number of nodes in the network.
This algorithm has a complexity of :math:`O(
V \ln^2 V)`, where :math:`V` is
the number of nodes in the network.
Examples
--------
...
...
src/graph_tool/generation/__init__.py
View file @
b54e1a83
...
...
@@ -1544,11 +1544,11 @@ def price_network(N, m=1, c=None, gamma=1, directed=True, seed_graph=None):
Note that if `seed_graph` is not given, the algorithm will *always* start
with one node if :math:`c > 0`, or with two nodes with a link between them
otherwise. If :math:`m > 1`, the degree of the newly added vertices will be
vary dynamically as :math:`m'(t) = \min(m,
N(t))`, where :math:`N
(t)` is the
vary dynamically as :math:`m'(t) = \min(m,
V(t))`, where :math:`V
(t)` is the
number of vertices added so far. If this behaviour is undesired, a proper
seed graph with :math:`
N
\ge m` vertices must be provided.
seed graph with :math:`
V
\ge m` vertices must be provided.
This algorithm runs in :math:`O(
N\log N
)` time.
This algorithm runs in :math:`O(
V\log V
)` time.
See Also
--------
...
...
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