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
40
Issues
40
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
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
96127341
Commit
96127341
authored
Jun 03, 2015
by
Tiago Peixoto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix bug with parallel edges when deg_corr=True and dl=True in minimize_blockmodel_dl()
This closes
#225
parent
65b8425e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
9 deletions
+10
-9
src/graph/community/graph_blockmodel.hh
src/graph/community/graph_blockmodel.hh
+8
-7
src/graph/community/graph_blockmodel_overlap.hh
src/graph/community/graph_blockmodel_overlap.hh
+2
-2
No files found.
src/graph/community/graph_blockmodel.hh
View file @
96127341
...
...
@@ -570,9 +570,10 @@ public:
return
S_a
-
S_b
;
}
template
<
class
Graph
,
class
OStats
>
template
<
class
Graph
,
class
OStats
,
class
EWeight
>
void
move_vertex
(
size_t
v
,
size_t
r
,
size_t
nr
,
bool
deg_corr
,
OStats
&
,
Graph
&
g
,
size_t
kin
=
0
,
size_t
kout
=
0
)
Graph
&
g
,
EWeight
&
eweight
,
size_t
kin
=
0
,
size_t
kout
=
0
)
{
if
(
r
==
nr
)
return
;
...
...
@@ -589,8 +590,8 @@ public:
{
if
(
kin
+
kout
==
0
)
{
kin
=
in_degreeS
()(
v
,
g
);
kout
=
out_degreeS
()(
v
,
g
);
kin
=
in_degreeS
()(
v
,
g
,
eweight
);
kout
=
out_degreeS
()(
v
,
g
,
eweight
);
}
auto
deg
=
make_pair
(
kin
,
kout
);
auto
iter
=
_hist
[
r
].
find
(
deg
);
...
...
@@ -1049,13 +1050,13 @@ void move_vertex(const Vec& vs, size_t nr, Eprop& mrs, Vprop& mrp, Vprop& mrm,
size_t
kin
=
0
,
kout
=
0
;
for
(
auto
v
:
vs
)
{
kin
+=
in_degreeS
()(
v
,
g
);
kout
+=
out_degreeS
()(
v
,
g
);
kin
+=
in_degreeS
()(
v
,
g
,
eweight
);
kout
+=
out_degreeS
()(
v
,
g
,
eweight
);
}
if
(
partition_stats
.
is_enabled
())
partition_stats
.
move_vertex
(
vs
[
0
],
b
[
vs
[
0
]],
nr
,
deg_corr
,
overlap_stats
,
g
,
kin
,
kout
);
g
,
eweight
,
kin
,
kout
);
for
(
auto
v
:
vs
)
{
...
...
src/graph/community/graph_blockmodel_overlap.hh
View file @
96127341
...
...
@@ -1078,9 +1078,9 @@ struct overlap_partition_stats_t
return
S_a
-
S_b
;
}
template
<
class
Graph
>
template
<
class
Graph
,
class
EWeight
>
void
move_vertex
(
size_t
v
,
size_t
r
,
size_t
nr
,
bool
,
overlap_stats_t
&
overlap_stats
,
Graph
&
g
,
overlap_stats_t
&
overlap_stats
,
Graph
&
g
,
EWeight
&
,
size_t
in_deg
=
0
,
size_t
out_deg
=
0
)
{
if
(
r
==
nr
)
...
...
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