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
e16c781f
Commit
e16c781f
authored
Jul 09, 2013
by
Tiago Peixoto
Browse files
Fix edge() function in adj_list class
parent
f54492ca
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/graph/graph_adjacency.hh
View file @
e16c781f
...
...
@@ -60,7 +60,7 @@ std::pair<typename adj_list<Vertex>::edge_iterator,
edges
(
const
adj_list
<
Vertex
>&
g
);
template
<
class
Vertex
>
std
::
pair
<
typename
adj_list
<
Vertex
>::
edge_
itera
tor
,
bool
>
std
::
pair
<
typename
adj_list
<
Vertex
>::
edge_
descrip
tor
,
bool
>
edge
(
Vertex
s
,
Vertex
t
,
const
adj_list
<
Vertex
>&
g
);
template
<
class
Vertex
>
...
...
@@ -274,7 +274,7 @@ private:
friend
std
::
pair
<
edge_iterator
,
edge_iterator
>
edges
<>
(
const
adj_list
<
Vertex
>&
g
);
friend
std
::
pair
<
edge_
itera
tor
,
bool
>
friend
std
::
pair
<
edge_
descrip
tor
,
bool
>
edge
<>
(
Vertex
s
,
Vertex
t
,
const
adj_list
<
Vertex
>&
g
);
friend
size_t
out_degree
<>
(
Vertex
v
,
const
adj_list
<
Vertex
>&
g
);
...
...
@@ -420,14 +420,14 @@ inline Vertex vertex(size_t i, const adj_list<Vertex>&)
}
template
<
class
Vertex
>
inline
std
::
pair
<
typename
adj_list
<
Vertex
>::
edge_
itera
tor
,
bool
>
inline
std
::
pair
<
typename
adj_list
<
Vertex
>::
edge_
descrip
tor
,
bool
>
edge
(
Vertex
s
,
Vertex
t
,
const
adj_list
<
Vertex
>&
g
)
{
typename
adj_list
<
Vertex
>::
edge_list_t
&
oes
=
g
.
_out_edges
[
s
];
const
typename
adj_list
<
Vertex
>::
edge_list_t
&
oes
=
g
.
_out_edges
[
s
];
for
(
size_t
i
=
0
;
i
<
oes
.
size
();
++
i
)
if
(
oes
[
i
].
first
==
t
)
return
std
::
make_pair
(
std
::
tr1
::
make_tuple
(
s
,
t
,
oes
[
i
].
second
),
true
);
Vertex
v
=
graph_traits
<
adj_list
<
Vertex
>
>::
null_ertex
();
Vertex
v
=
graph_traits
<
adj_list
<
Vertex
>
>::
null_
v
ertex
();
return
std
::
make_pair
(
std
::
tr1
::
make_tuple
(
v
,
v
,
v
),
false
);
}
...
...
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