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
47dba275
Commit
47dba275
authored
Feb 10, 2009
by
Tiago Peixoto
Browse files
Fix (yet again) edge index housekeeping
parent
7f10e926
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/graph/graph_python_interface.cc
View file @
47dba275
...
...
@@ -236,19 +236,13 @@ void GraphInterface::RemoveEdgeIndex(const edge_t& e)
size_t
index
=
_edge_index
[
e
];
if
(
index
==
_max_edge_index
)
{
if
(
_max_edge_index
-
1
==
_free_indexes
.
back
())
{
if
(
_max_edge_index
>
0
)
_max_edge_index
--
;
while
(
_max_edge_index
==
_free_indexes
.
back
())
{
_free_indexes
.
pop_back
();
if
(
_max_edge_index
>
0
)
_max_edge_index
--
;
}
}
else
if
(
_max_edge_index
>
0
)
_max_edge_index
--
;
while
(
!
_free_indexes
.
empty
()
&&
_max_edge_index
==
_free_indexes
.
back
())
{
_free_indexes
.
pop_back
();
if
(
_max_edge_index
>
0
)
_max_edge_index
--
;
}
...
...
src/graph/graph_wrap.hh
View file @
47dba275
...
...
@@ -195,7 +195,7 @@ template <class Graph>
inline
void
remove_edge
(
typename
graph_traits
<
GraphWrap
<
Graph
>
>::
edge_descriptor
e
,
GraphWrap
<
Graph
>&
g
)
{
g
.
_gi
.
RemoveEdge
(
e
);
g
.
_gi
.
RemoveEdge
Index
(
e
);
}
template
<
class
Graph
>
...
...
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