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
3ca7df5f
Commit
3ca7df5f
authored
Dec 27, 2019
by
Tiago Peixoto
Browse files
inference: fix mergesplit with clabel in multflip_mcmc_sweep()
parent
de8556fc
Changes
1
Show whitespace changes
Inline
Side-by-side
src/graph/inference/blockmodel/graph_blockmodel_multiflip_mcmc.hh
View file @
3ca7df5f
...
@@ -90,10 +90,10 @@ struct MCMC
...
@@ -90,10 +90,10 @@ struct MCMC
_entropy_args
.
edges_dl
));
_entropy_args
.
edges_dl
));
for
(
auto
v
:
vertices_range
(
_state
.
_g
))
for
(
auto
v
:
vertices_range
(
_state
.
_g
))
{
{
if
(
_state
.
_
v
weight
[
v
]
==
0
)
if
(
_state
.
node
_weight
(
v
)
==
0
)
continue
;
continue
;
add_element
(
_groups
[
_state
.
_b
[
v
]],
_vpos
,
v
);
add_element
(
_groups
[
_state
.
_b
[
v
]],
_vpos
,
v
);
_N
+=
_state
.
_
v
weight
[
v
]
;
_N
+=
_state
.
node
_weight
(
v
)
;
}
}
for
(
auto
r
:
vertices_range
(
_state
.
_bg
))
for
(
auto
r
:
vertices_range
(
_state
.
_bg
))
...
@@ -725,7 +725,11 @@ struct MCMC
...
@@ -725,7 +725,11 @@ struct MCMC
size_t
s
=
get
<
0
>
(
ret
);
size_t
s
=
get
<
0
>
(
ret
);
if
(
s
==
null_group
)
if
(
s
==
null_group
)
{
while
(
!
_bstack
.
empty
())
pop_b
();
return
{
_null_move
,
1
};
return
{
_null_move
,
1
};
}
_dS
+=
get
<
1
>
(
ret
);
_dS
+=
get
<
1
>
(
ret
);
pf
+=
get
<
2
>
(
ret
);
pf
+=
get
<
2
>
(
ret
);
...
...
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