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
7b8b158c
Commit
7b8b158c
authored
Jun 25, 2015
by
Tiago Peixoto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix bug in edge_endpoint_property()
parent
449fca9e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
4 deletions
+7
-4
src/graph/graph_properties_imp1.cc
src/graph/graph_properties_imp1.cc
+7
-4
No files found.
src/graph/graph_properties_imp1.cc
View file @
7b8b158c
...
...
@@ -31,7 +31,7 @@ struct do_edge_endpoint
{
template
<
class
Graph
,
class
EdgeIndexMap
,
class
VertexPropertyMap
>
void
operator
()(
Graph
&
g
,
EdgeIndexMap
,
VertexPropertyMap
prop
,
boost
::
any
aeprop
)
const
boost
::
any
aeprop
,
size_t
max_edge_index
)
const
{
typedef
typename
property_traits
<
VertexPropertyMap
>::
value_type
vval_t
;
typedef
typename
boost
::
mpl
::
if_
<
std
::
is_same
<
vval_t
,
size_t
>
,
int64_t
,
vval_t
>::
type
...
...
@@ -39,7 +39,7 @@ struct do_edge_endpoint
typedef
typename
property_map_type
::
apply
<
val_t
,
EdgeIndexMap
>::
type
eprop_t
;
eprop_t
eprop
=
any_cast
<
eprop_t
>
(
aeprop
);
eprop
.
reserve
(
num_edges
(
g
)
);
eprop
.
reserve
(
max_edge_index
);
int
i
,
N
=
num_vertices
(
g
);
#pragma omp parallel for default(shared) private(i) \
...
...
@@ -67,12 +67,15 @@ struct do_edge_endpoint
void
edge_endpoint
(
GraphInterface
&
gi
,
boost
::
any
prop
,
boost
::
any
eprop
,
std
::
string
endpoint
)
{
size_t
max_edge_index
=
gi
.
GetMaxEdgeIndex
();
if
(
endpoint
==
"source"
)
run_action
<>
()(
gi
,
std
::
bind
(
do_edge_endpoint
<
true
>
(),
placeholders
::
_1
,
gi
.
GetEdgeIndex
(),
placeholders
::
_2
,
eprop
),
gi
.
GetEdgeIndex
(),
placeholders
::
_2
,
eprop
,
max_edge_index
),
vertex_properties
())(
prop
);
else
run_action
<>
()(
gi
,
std
::
bind
(
do_edge_endpoint
<
false
>
(),
placeholders
::
_1
,
gi
.
GetEdgeIndex
(),
placeholders
::
_2
,
eprop
),
gi
.
GetEdgeIndex
(),
placeholders
::
_2
,
eprop
,
max_edge_index
),
vertex_properties
())(
prop
);
}
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