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
1a49d458
Commit
1a49d458
authored
Apr 23, 2015
by
Tiago Peixoto
Browse files
Fix bug in CovariateBlockState.merge_layers() with non-overlapping groups
parent
c72bb4c0
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/graph_tool/community/covariate_blockmodel.py
View file @
1a49d458
...
...
@@ -239,9 +239,11 @@ class CovariateBlockState(BlockState):
nt
=
1
if
openmp_enabled
():
nt
=
openmp_get_num_threads
()
B
=
u
.
num_vertices
()
+
2
*
nt
B
=
max
(
B
,
u
.
vp
[
"b"
].
a
.
max
()
+
1
+
2
*
nt
)
if
not
self
.
overlap
:
state
=
BlockState
(
u
,
b
=
u
.
vp
[
"b"
],
B
=
u
.
num_vertices
()
+
2
*
nt
,
B
=
B
,
eweight
=
u
.
ep
[
"weight"
],
vweight
=
u
.
vp
[
"weight"
],
deg_corr
=
self
.
deg_corr
,
...
...
@@ -249,8 +251,6 @@ class CovariateBlockState(BlockState):
max_BE
=
self
.
max_BE
)
else
:
base_u
,
node_index
=
self
.
__get_base_u
(
u
)
B
=
u
.
num_vertices
()
+
2
*
nt
B
=
max
(
B
,
u
.
vp
[
"b"
].
a
.
max
()
+
1
+
2
*
nt
)
state
=
OverlapBlockState
(
u
,
b
=
u
.
vp
[
"b"
].
a
,
B
=
B
,
vweight
=
u
.
vp
[
"weight"
],
...
...
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