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
d2e7d4f9
Commit
d2e7d4f9
authored
Aug 21, 2015
by
Tiago Peixoto
Browse files
BlockState: Remove instance counting
parent
d0709299
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/graph_tool/community/blockmodel.py
View file @
d2e7d4f9
...
...
@@ -92,12 +92,9 @@ class BlockState(object):
memory,
"""
_state_ref_count
=
0
def
__init__
(
self
,
g
,
eweight
=
None
,
vweight
=
None
,
b
=
None
,
B
=
None
,
clabel
=
None
,
deg_corr
=
True
,
max_BE
=
1000
,
**
kwargs
):
BlockState
.
_state_ref_count
+=
1
# initialize weights to unity, if necessary
if
eweight
is
None
:
...
...
src/graph_tool/community/covariate_blockmodel.py
View file @
d2e7d4f9
...
...
@@ -85,9 +85,6 @@ class CovariateBlockState(BlockState):
def
__init__
(
self
,
g
,
ec
,
eweight
=
None
,
vweight
=
None
,
b
=
None
,
B
=
None
,
clabel
=
None
,
layers
=
False
,
deg_corr
=
True
,
overlap
=
False
,
**
kwargs
):
BlockState
.
_state_ref_count
+=
1
self
.
g
=
g
if
kwargs
.
get
(
"ec_done"
,
False
):
...
...
src/graph_tool/community/overlap_blockmodel.py
View file @
d2e7d4f9
...
...
@@ -75,8 +75,6 @@ class OverlapBlockState(BlockState):
def
__init__
(
self
,
g
,
b
=
None
,
B
=
None
,
clabel
=
None
,
deg_corr
=
True
,
max_BE
=
1000
,
**
kwargs
):
BlockState
.
_state_ref_count
+=
1
# determine if there is a base graph, and overlapping structure
self
.
base_g
=
kwargs
.
get
(
"base_g"
,
None
)
...
...
Write
Preview
Supports
Markdown
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