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
43
Issues
43
List
Boards
Labels
Service Desk
Milestones
Merge Requests
1
Merge Requests
1
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
acedc700
Commit
acedc700
authored
Aug 21, 2015
by
Tiago Peixoto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
graph_blockmodel.hh: Return const references in egroup sampling
parent
8d806b4e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
src/graph/community/graph_blockmodel.hh
src/graph/community/graph_blockmodel.hh
+4
-4
No files found.
src/graph/community/graph_blockmodel.hh
View file @
acedc700
...
...
@@ -2010,15 +2010,15 @@ struct egroups_manage
}
template
<
class
Edge
,
class
RNG
>
static
typename
std
::
tuple_element
<
0
,
Edge
>::
type
sample_edge
(
DynamicSampler
<
Edge
>&
elist
,
RNG
&
rng
)
static
const
typename
std
::
tuple_element
<
0
,
Edge
>::
type
&
sample_edge
(
const
DynamicSampler
<
Edge
>&
elist
,
RNG
&
rng
)
{
return
get
<
0
>
(
elist
.
sample
(
rng
));
}
template
<
class
Edge
,
class
RNG
>
static
typename
std
::
tuple_element
<
0
,
Edge
>::
type
sample_edge
(
vector
<
Edge
>&
elist
,
RNG
&
rng
)
static
const
typename
std
::
tuple_element
<
0
,
Edge
>::
type
&
sample_edge
(
const
vector
<
Edge
>&
elist
,
RNG
&
rng
)
{
std
::
uniform_int_distribution
<
size_t
>
urand
(
0
,
elist
.
size
()
-
1
);
size_t
ur
=
urand
(
rng
);
...
...
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