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
d0709299
Commit
d0709299
authored
Aug 20, 2015
by
Tiago Peixoto
Browse files
covariate_blockmodel.py: Fix initialization bug in CovariatBlockState
parent
a27a87af
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/graph_tool/community/covariate_blockmodel.py
View file @
d0709299
...
...
@@ -194,6 +194,9 @@ class CovariateBlockState(BlockState):
assert
state
.
mrs
.
fa
.
sum
()
==
state
.
eweight
.
fa
.
sum
(),
(
"inconsistent mrs!"
,
l
)
#self.wr = self.__dummy_bg.own_property(total_state.wr)
self
.
wr
=
total_state
.
wr
self
.
clear_cache
()
if
_bm_test
():
...
...
@@ -204,19 +207,18 @@ class CovariateBlockState(BlockState):
self
.
__bg
=
None
self
.
__mrs
=
None
self
.
__bec
=
None
self
.
__dummy_bg
=
Graph
(
directed
=
g
.
is_directed
())
self
.
__dummy_bg
=
Graph
(
directed
=
self
.
g
.
is_directed
())
self
.
__dummy_bg
.
add_vertex
(
self
.
B
)
#self.wr = self.__dummy_bg.own_property(total_state.wr)
self
.
wr
=
total_state
.
wr
for
s
in
self
.
states
:
s
.
clear_cache
()
self
.
total_state
.
clear_cache
()
self
.
sweep_vertices
=
total_state
.
sweep_vertices
self
.
sweep_vertices
=
self
.
total_state
.
sweep_vertices
self
.
emat
=
None
self
.
overlap_stats
=
self
.
total_state
.
overlap_stats
self
.
__layer_entropy
=
None
def
__get_base_u
(
self
,
u
):
node_index
=
u
.
vp
[
"vmap"
].
copy
(
"int64_t"
)
...
...
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