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
43
Issues
43
List
Boards
Labels
Service Desk
Milestones
Merge Requests
1
Merge Requests
1
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
fe27ada4
Commit
fe27ada4
authored
Aug 25, 2015
by
Tiago Peixoto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix issue in Overlap/Covariate/BlockState.__check_clabel()
parent
5908da56
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
12 deletions
+12
-12
src/graph_tool/community/blockmodel.py
src/graph_tool/community/blockmodel.py
+4
-4
src/graph_tool/community/covariate_blockmodel.py
src/graph_tool/community/covariate_blockmodel.py
+4
-4
src/graph_tool/community/overlap_blockmodel.py
src/graph_tool/community/overlap_blockmodel.py
+4
-4
No files found.
src/graph_tool/community/blockmodel.py
View file @
fe27ada4
...
...
@@ -264,12 +264,12 @@ class BlockState(object):
deg_corr
=
self
.
deg_corr
if
deg_corr
is
None
else
deg_corr
,
max_BE
=
self
.
max_BE
,
**
kwargs
)
if
not
state
.
__check_clabel
():
if
_bm_test
()
or
not
kwargs
.
get
(
"fix_clabel"
,
True
)
:
raise
RuntimeError
(
"Inconsistent clabel after copy!"
)
b
=
state
.
b
.
a
+
state
.
clabel
.
a
*
state
.
B
if
not
state
.
__check_clabel
()
and
kwargs
.
get
(
"fix_clabel"
,
True
):
b
=
state
.
b
.
fa
+
state
.
clabel
.
fa
*
state
.
B
continuous_map
(
b
)
state
=
state
.
copy
(
b
=
b
,
fix_clabel
=
False
)
if
not
state
.
__check_clabel
():
raise
RuntimeError
(
"Inconsistent clabel after copy!"
)
return
state
...
...
src/graph_tool/community/covariate_blockmodel.py
View file @
fe27ada4
...
...
@@ -509,12 +509,12 @@ class CovariateBlockState(BlockState):
eindex
=
self
.
total_state
.
eindex
if
self
.
overlap
else
None
,
ec_done
=
ec
is
None
)
if
not
state
.
_BlockState__check_clabel
():
if
_bm_test
()
or
not
kwargs
.
get
(
"fix_clabel"
,
True
)
:
raise
RuntimeError
(
"Inconsistent clabel after copy!"
)
b
=
state
.
b
.
a
+
state
.
clabel
.
a
*
state
.
B
if
not
state
.
_BlockState__check_clabel
()
and
kwargs
.
get
(
"fix_clabel"
,
True
):
b
=
state
.
b
.
fa
+
state
.
clabel
.
fa
*
state
.
B
continuous_map
(
b
)
state
=
state
.
copy
(
b
=
b
,
fix_clabel
=
False
)
if
not
state
.
_BlockState__check_clabel
():
raise
RuntimeError
(
"Inconsistent clabel after copy!"
)
return
state
...
...
src/graph_tool/community/overlap_blockmodel.py
View file @
fe27ada4
...
...
@@ -281,12 +281,12 @@ class OverlapBlockState(BlockState):
deg_corr
=
self
.
deg_corr
if
deg_corr
is
None
else
deg_corr
,
max_BE
=
self
.
max_BE
)
if
not
state
.
_BlockState__check_clabel
():
if
_bm_test
()
or
not
kwargs
.
get
(
"fix_clabel"
,
True
)
:
raise
RuntimeError
(
"Inconsistent clabel after copy!"
)
b
=
state
.
b
.
a
+
state
.
clabel
.
a
*
state
.
B
if
not
state
.
_BlockState__check_clabel
()
and
kwargs
.
get
(
"fix_clabel"
,
True
):
b
=
state
.
b
.
fa
+
state
.
clabel
.
fa
*
state
.
B
continuous_map
(
b
)
state
=
state
.
copy
(
b
=
b
,
fix_clabel
=
False
)
if
not
state
.
_BlockState__check_clabel
():
raise
RuntimeError
(
"Inconsistent clabel after copy!"
)
return
state
...
...
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