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
5d66e191
Commit
5d66e191
authored
Feb 03, 2014
by
Tiago Peixoto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove redundant get_weight() method in BlockState and update get_ers() docstring
parent
ed54390f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
12 deletions
+2
-12
src/graph_tool/community/blockmodel.py
src/graph_tool/community/blockmodel.py
+2
-12
No files found.
src/graph_tool/community/blockmodel.py
View file @
5d66e191
...
...
@@ -217,7 +217,8 @@ class BlockState(object):
return
self
.
bg
def
get_ers
(
self
):
r
"""Returns the edge property map of the block graph which contains the :math:`e_{rs}` matrix entries."""
r
"""Returns the edge property map of the block graph which contains the :math:`e_{rs}` matrix entries.
For undirected graphs, the diagonal values (self-loops) contain :math:`e_{rr}/2`."""
return
self
.
mrs
def
get_er
(
self
):
...
...
@@ -234,17 +235,6 @@ class BlockState(object):
r
"""Returns the vertex property map of the block graph which contains the block sizes :math:`n_r`."""
return
self
.
wr
def
get_eweight
(
self
):
r
"""Returns the block edge counts associated with the block matrix
:math:`e_{rs}`. For directed graphs it is identical to :math:`e_{rs}`,
but for undirected graphs it is identical except for the diagonal, which
is :math:`e_{rr}/2`."""
eweight
=
self
.
mrs
.
copy
()
if
not
self
.
g
.
is_directed
():
sl
=
label_self_loops
(
self
.
bg
,
mark_only
=
True
)
eweight
.
a
[
sl
.
a
>
0
]
/=
2
return
eweight
def
entropy
(
self
,
complete
=
False
,
random
=
False
,
dl
=
False
,
dense
=
False
,
multigraph
=
False
):
r
"""Calculate the entropy per edge associated with the current block partition.
...
...
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