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
79190e65
Commit
79190e65
authored
Jan 04, 2018
by
Tiago Peixoto
Browse files
graph_blockmodel_elist.hh: Clear empty buckets
parent
385e8f86
Changes
1
Show whitespace changes
Inline
Side-by-side
src/graph/inference/blockmodel/graph_blockmodel_elist.hh
View file @
79190e65
...
...
@@ -173,6 +173,9 @@ public:
_epos
[
get
<
0
>
(
elist
[
pos
])].
second
=
numeric_limits
<
size_t
>::
max
();
elist
[
pos
]
=
elist
.
back
();
elist
.
pop_back
();
if
(
elist
.
empty
())
elist
.
shrink_to_fit
();
}
template
<
class
Edge
>
...
...
@@ -185,6 +188,9 @@ public:
else
_epos
[
get
<
0
>
(
elist
[
pos
])].
second
=
numeric_limits
<
size_t
>::
max
();
elist
.
remove
(
pos
);
if
(
elist
.
empty
())
elist
.
rebuild
();
}
template
<
class
Vertex
,
class
VProp
>
...
...
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