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
9dc8c691
Commit
9dc8c691
authored
Sep 13, 2015
by
Tiago Peixoto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Get rid of inconsistent CamelCase in GraphInterface methods
parent
fa6816e0
Changes
78
Hide whitespace changes
Inline
Side-by-side
Showing
78 changed files
with
515 additions
and
520 deletions
+515
-520
src/graph/centrality/graph_betweenness.cc
src/graph/centrality/graph_betweenness.cc
+4
-4
src/graph/centrality/graph_closeness.cc
src/graph/centrality/graph_closeness.cc
+2
-2
src/graph/centrality/graph_eigentrust.cc
src/graph/centrality/graph_eigentrust.cc
+1
-1
src/graph/centrality/graph_eigenvector.cc
src/graph/centrality/graph_eigenvector.cc
+1
-1
src/graph/centrality/graph_hits.cc
src/graph/centrality/graph_hits.cc
+1
-1
src/graph/centrality/graph_katz.cc
src/graph/centrality/graph_katz.cc
+1
-1
src/graph/centrality/graph_pagerank.cc
src/graph/centrality/graph_pagerank.cc
+2
-2
src/graph/centrality/graph_trust_transitivity.cc
src/graph/centrality/graph_trust_transitivity.cc
+1
-1
src/graph/clustering/graph_clustering.cc
src/graph/clustering/graph_clustering.cc
+6
-6
src/graph/clustering/graph_extended_clustering.cc
src/graph/clustering/graph_extended_clustering.cc
+2
-2
src/graph/clustering/graph_motifs.cc
src/graph/clustering/graph_motifs.cc
+2
-2
src/graph/community/graph_blockmodel.cc
src/graph/community/graph_blockmodel.cc
+15
-15
src/graph/community/graph_blockmodel_covariates.cc
src/graph/community/graph_blockmodel_covariates.cc
+6
-6
src/graph/community/graph_blockmodel_covariates.hh
src/graph/community/graph_blockmodel_covariates.hh
+2
-2
src/graph/community/graph_blockmodel_overlap.cc
src/graph/community/graph_blockmodel_overlap.cc
+5
-5
src/graph/community/graph_community.cc
src/graph/community/graph_community.cc
+1
-1
src/graph/community/graph_community_network.cc
src/graph/community/graph_community_network.cc
+1
-1
src/graph/community/graph_community_network_eavg_imp1.cc
src/graph/community/graph_community_network_eavg_imp1.cc
+1
-1
src/graph/community/graph_community_network_edges.cc
src/graph/community/graph_community_network_edges.cc
+1
-1
src/graph/community/graph_community_network_vavg.cc
src/graph/community/graph_community_network_vavg.cc
+2
-2
src/graph/correlations/graph_avg_correlations.hh
src/graph/correlations/graph_avg_correlations.hh
+12
-12
src/graph/correlations/graph_corr_hist.hh
src/graph/correlations/graph_corr_hist.hh
+2
-2
src/graph/correlations/graph_correlations.hh
src/graph/correlations/graph_correlations.hh
+8
-8
src/graph/draw/graph_tree_cts.cc
src/graph/draw/graph_tree_cts.cc
+1
-1
src/graph/flow/graph_edmonds_karp.cc
src/graph/flow/graph_edmonds_karp.cc
+2
-2
src/graph/flow/graph_kolmogorov.cc
src/graph/flow/graph_kolmogorov.cc
+2
-2
src/graph/flow/graph_maximum_cardinality_matching.cc
src/graph/flow/graph_maximum_cardinality_matching.cc
+1
-1
src/graph/flow/graph_push_relabel.cc
src/graph/flow/graph_push_relabel.cc
+2
-2
src/graph/generation/graph_complete.cc
src/graph/generation/graph_complete.cc
+2
-2
src/graph/generation/graph_generation.cc
src/graph/generation/graph_generation.cc
+1
-1
src/graph/generation/graph_lattice.cc
src/graph/generation/graph_lattice.cc
+1
-1
src/graph/generation/graph_line_graph.cc
src/graph/generation/graph_line_graph.cc
+2
-2
src/graph/generation/graph_predecessor.cc
src/graph/generation/graph_predecessor.cc
+1
-1
src/graph/generation/graph_rewiring.cc
src/graph/generation/graph_rewiring.cc
+7
-7
src/graph/generation/graph_triangulation.cc
src/graph/generation/graph_triangulation.cc
+1
-1
src/graph/generation/graph_union.cc
src/graph/generation/graph_union.cc
+2
-2
src/graph/generation/graph_union_eprop.cc
src/graph/generation/graph_union_eprop.cc
+1
-1
src/graph/generation/graph_union_vprop.cc
src/graph/generation/graph_union_vprop.cc
+1
-1
src/graph/graph.cc
src/graph/graph.cc
+8
-8
src/graph/graph.hh
src/graph/graph.hh
+42
-42
src/graph/graph_bind.cc
src/graph/graph_bind.cc
+34
-34
src/graph/graph_filtering.cc
src/graph/graph_filtering.cc
+10
-10
src/graph/graph_filtering.hh
src/graph/graph_filtering.hh
+3
-3
src/graph/graph_io.cc
src/graph/graph_io.cc
+25
-25
src/graph/graph_properties.cc
src/graph/graph_properties.cc
+13
-12
src/graph/graph_properties_copy.cc
src/graph/graph_properties_copy.cc
+8
-8
src/graph/graph_properties_imp1.cc
src/graph/graph_properties_imp1.cc
+3
-3
src/graph/graph_python_interface.cc
src/graph/graph_python_interface.cc
+28
-28
src/graph/graph_python_interface.hh
src/graph/graph_python_interface.hh
+62
-62
src/graph/graph_python_interface_export.cc
src/graph/graph_python_interface_export.cc
+25
-24
src/graph/histogram.hh
src/graph/histogram.hh
+16
-16
src/graph/layout/graph_sfdp.cc
src/graph/layout/graph_sfdp.cc
+3
-3
src/graph/search/graph_dfs.cc
src/graph/search/graph_dfs.cc
+1
-1
src/graph/stats/graph_distance.cc
src/graph/stats/graph_distance.cc
+2
-2
src/graph/stats/graph_distance.hh
src/graph/stats/graph_distance.hh
+4
-4
src/graph/stats/graph_distance_sampled.cc
src/graph/stats/graph_distance_sampled.cc
+2
-2
src/graph/stats/graph_distance_sampled.hh
src/graph/stats/graph_distance_sampled.hh
+4
-4
src/graph/stats/graph_histograms.cc
src/graph/stats/graph_histograms.cc
+3
-3
src/graph/stats/graph_histograms.hh
src/graph/stats/graph_histograms.hh
+5
-5
src/graph/topology/graph_all_distances.cc
src/graph/topology/graph_all_distances.cc
+1
-1
src/graph/topology/graph_bipartite.cc
src/graph/topology/graph_bipartite.cc
+1
-1
src/graph/topology/graph_diameter.cc
src/graph/topology/graph_diameter.cc
+2
-2
src/graph/topology/graph_distance.cc
src/graph/topology/graph_distance.cc
+4
-4
src/graph/topology/graph_isomorphism.cc
src/graph/topology/graph_isomorphism.cc
+8
-8
src/graph/topology/graph_kcore.cc
src/graph/topology/graph_kcore.cc
+1
-1
src/graph/topology/graph_maximal_planar.cc
src/graph/topology/graph_maximal_planar.cc
+2
-2
src/graph/topology/graph_maximal_vertex_set.cc
src/graph/topology/graph_maximal_vertex_set.cc
+1
-1
src/graph/topology/graph_minimum_spanning_tree.cc
src/graph/topology/graph_minimum_spanning_tree.cc
+2
-2
src/graph/topology/graph_planar.cc
src/graph/topology/graph_planar.cc
+2
-2
src/graph/topology/graph_random_matching.cc
src/graph/topology/graph_random_matching.cc
+1
-1
src/graph/topology/graph_random_spanning_tree.cc
src/graph/topology/graph_random_spanning_tree.cc
+1
-1
src/graph/topology/graph_similarity.cc
src/graph/topology/graph_similarity.cc
+2
-2
src/graph/topology/graph_subgraph_isomorphism.cc
src/graph/topology/graph_subgraph_isomorphism.cc
+6
-6
src/graph/topology/graph_transitive_closure.cc
src/graph/topology/graph_transitive_closure.cc
+1
-1
src/graph/util/graph_search.cc
src/graph/util/graph_search.cc
+1
-1
src/graph_tool/__init__.py
src/graph_tool/__init__.py
+65
-70
src/graph_tool/io.py
src/graph_tool/io.py
+6
-8
src/graph_tool/run_action/inline.py
src/graph_tool/run_action/inline.py
+1
-1
No files found.
src/graph/centrality/graph_betweenness.cc
View file @
9dc8c691
...
...
@@ -140,10 +140,10 @@ void betweenness(GraphInterface& g, boost::any weight,
{
run_action
<>
()
(
g
,
std
::
bind
<>
(
get_weighted_betweenness
(),
std
::
placeholders
::
_1
,
g
.
GetVertexI
ndex
(),
std
::
placeholders
::
_1
,
g
.
get_vertex_i
ndex
(),
std
::
placeholders
::
_2
,
std
::
placeholders
::
_3
,
weight
,
normalize
,
g
.
GetNumberOfVertices
(),
g
.
GetMaxEdgeI
ndex
()),
g
.
get_num_vertices
(),
g
.
get_max_edge_i
ndex
()),
edge_floating_properties
(),
vertex_floating_properties
())
(
edge_betweenness
,
vertex_betweenness
);
...
...
@@ -152,9 +152,9 @@ void betweenness(GraphInterface& g, boost::any weight,
{
run_action
<>
()
(
g
,
std
::
bind
<
void
>
(
get_betweenness
(),
std
::
placeholders
::
_1
,
g
.
GetVertexI
ndex
(),
std
::
placeholders
::
_2
,
g
.
get_vertex_i
ndex
(),
std
::
placeholders
::
_2
,
std
::
placeholders
::
_3
,
normalize
,
g
.
GetNumberOfV
ertices
()),
g
.
get_num_v
ertices
()),
edge_floating_properties
(),
vertex_floating_properties
())
(
edge_betweenness
,
vertex_betweenness
);
...
...
src/graph/centrality/graph_closeness.cc
View file @
9dc8c691
...
...
@@ -35,7 +35,7 @@ void do_get_closeness(GraphInterface& gi, boost::any weight,
{
run_action
<>
()(
gi
,
std
::
bind
(
get_closeness
(),
placeholders
::
_1
,
gi
.
GetVertexI
ndex
(),
no_weightS
(),
gi
.
get_vertex_i
ndex
(),
no_weightS
(),
placeholders
::
_2
,
harmonic
,
norm
),
writable_vertex_scalar_properties
())(
closeness
);
}
...
...
@@ -43,7 +43,7 @@ void do_get_closeness(GraphInterface& gi, boost::any weight,
{
run_action
<>
()(
gi
,
std
::
bind
(
get_closeness
(),
placeholders
::
_1
,
gi
.
GetVertexI
ndex
(),
placeholders
::
_2
,
gi
.
get_vertex_i
ndex
(),
placeholders
::
_2
,
placeholders
::
_3
,
harmonic
,
norm
),
edge_scalar_properties
(),
writable_vertex_scalar_properties
())(
weight
,
closeness
);
...
...
src/graph/centrality/graph_eigentrust.cc
View file @
9dc8c691
...
...
@@ -38,7 +38,7 @@ size_t eigentrust(GraphInterface& g, boost::any c, boost::any t,
size_t
iter
=
0
;
run_action
<>
()
(
g
,
bind
(
get_eigentrust
(),
_1
,
g
.
GetVertexIndex
(),
g
.
GetEdgeI
ndex
(),
_2
,
_1
,
g
.
get_vertex_index
(),
g
.
get_edge_i
ndex
(),
_2
,
_3
,
epslon
,
max_iter
,
ref
(
iter
)),
writable_edge_scalar_properties
(),
vertex_floating_properties
())(
c
,
t
);
...
...
src/graph/centrality/graph_eigenvector.cc
View file @
9dc8c691
...
...
@@ -42,7 +42,7 @@ long double eigenvector(GraphInterface& g, boost::any w, boost::any c,
long
double
eig
=
0
;
run_action
<>
()
(
g
,
std
::
bind
(
get_eigenvector
(),
placeholders
::
_1
,
g
.
GetVertexI
ndex
(),
(
g
,
std
::
bind
(
get_eigenvector
(),
placeholders
::
_1
,
g
.
get_vertex_i
ndex
(),
placeholders
::
_2
,
placeholders
::
_3
,
epsilon
,
max_iter
,
std
::
ref
(
eig
)),
weight_props_t
(),
...
...
src/graph/centrality/graph_hits.cc
View file @
9dc8c691
...
...
@@ -68,7 +68,7 @@ long double hits(GraphInterface& g, boost::any w, boost::any x, boost::any y,
long
double
eig
=
0
;
run_action
<>
()
(
g
,
std
::
bind
(
get_hits_dispatch
(),
placeholders
::
_1
,
g
.
GetVertexI
ndex
(),
(
g
,
std
::
bind
(
get_hits_dispatch
(),
placeholders
::
_1
,
g
.
get_vertex_i
ndex
(),
placeholders
::
_2
,
placeholders
::
_3
,
y
,
epsilon
,
max_iter
,
std
::
ref
(
eig
)),
weight_props_t
(),
...
...
src/graph/centrality/graph_katz.cc
View file @
9dc8c691
...
...
@@ -53,7 +53,7 @@ void katz(GraphInterface& g, boost::any w, boost::any c, boost::any beta,
if
(
beta
.
empty
())
beta
=
beta_map_t
(
1.
);
run_action
<>
()(
g
,
std
::
bind
(
get_katz
(),
placeholders
::
_1
,
g
.
GetVertexI
ndex
(),
run_action
<>
()(
g
,
std
::
bind
(
get_katz
(),
placeholders
::
_1
,
g
.
get_vertex_i
ndex
(),
placeholders
::
_2
,
placeholders
::
_3
,
placeholders
::
_4
,
alpha
,
epsilon
,
max_iter
),
weight_props_t
(),
...
...
src/graph/centrality/graph_pagerank.cc
View file @
9dc8c691
...
...
@@ -42,7 +42,7 @@ size_t pagerank(GraphInterface& g, boost::any rank, boost::any pers,
pers_props_t
;
if
(
pers
.
empty
())
pers
=
pers_map_t
(
1.0
/
g
.
GetNumberOfV
ertices
());
pers
=
pers_map_t
(
1.0
/
g
.
get_num_v
ertices
());
typedef
ConstantPropertyMap
<
double
,
GraphInterface
::
edge_t
>
weight_map_t
;
typedef
boost
::
mpl
::
push_back
<
edge_scalar_properties
,
weight_map_t
>::
type
...
...
@@ -57,7 +57,7 @@ size_t pagerank(GraphInterface& g, boost::any rank, boost::any pers,
size_t
iter
;
run_action
<>
()
(
g
,
std
::
bind
(
get_pagerank
(),
placeholders
::
_1
,
g
.
GetVertexI
ndex
(),
placeholders
::
_2
,
placeholders
::
_1
,
g
.
get_vertex_i
ndex
(),
placeholders
::
_2
,
placeholders
::
_3
,
placeholders
::
_4
,
d
,
epsilon
,
max_iter
,
std
::
ref
(
iter
)),
vertex_floating_properties
(),
...
...
src/graph/centrality/graph_trust_transitivity.cc
View file @
9dc8c691
...
...
@@ -37,7 +37,7 @@ void trust_transitivity(GraphInterface& g, int64_t source, int64_t target,
throw
ValueException
(
"vertex property must be of floating point valued vector type"
);
run_action
<>
()(
g
,
bind
<
void
>
(
get_trust_transitivity
(),
_1
,
g
.
GetVertexI
ndex
(),
bind
<
void
>
(
get_trust_transitivity
(),
_1
,
g
.
get_vertex_i
ndex
(),
source
,
target
,
_2
,
_3
),
edge_floating_properties
(),
vertex_floating_vector_properties
())(
c
,
t
);
...
...
src/graph/clustering/graph_clustering.cc
View file @
9dc8c691
...
...
@@ -34,25 +34,25 @@ using namespace graph_tool;
boost
::
python
::
tuple
global_clustering
(
GraphInterface
&
g
)
{
double
c
,
c_err
;
bool
directed
=
g
.
GetD
irected
();
g
.
SetD
irected
(
false
);
bool
directed
=
g
.
get_d
irected
();
g
.
set_d
irected
(
false
);
run_action
<
graph_tool
::
detail
::
never_directed
>
()
(
g
,
std
::
bind
(
get_global_clustering
(),
std
::
placeholders
::
_1
,
std
::
ref
(
c
),
std
::
ref
(
c_err
)))();
g
.
SetD
irected
(
directed
);
g
.
set_d
irected
(
directed
);
return
boost
::
python
::
make_tuple
(
c
,
c_err
);
}
void
local_clustering
(
GraphInterface
&
g
,
boost
::
any
prop
)
{
bool
directed
=
g
.
GetD
irected
();
g
.
SetD
irected
(
false
);
bool
directed
=
g
.
get_d
irected
();
g
.
set_d
irected
(
false
);
run_action
<
graph_tool
::
detail
::
never_directed
>
()
(
g
,
std
::
bind
(
set_clustering_to_property
(),
std
::
placeholders
::
_1
,
std
::
placeholders
::
_2
),
writable_vertex_scalar_properties
())(
prop
);
g
.
SetD
irected
(
directed
);
g
.
set_d
irected
(
directed
);
}
using
namespace
boost
::
python
;
...
...
src/graph/clustering/graph_extended_clustering.cc
View file @
9dc8c691
...
...
@@ -82,7 +82,7 @@ void extended_clustering(GraphInterface& g, boost::python::list props)
boost
::
any
vprop
=
prop_vector
<
writable_vertex_scalar_properties
>
()
(
cmaps
,
num_vertices
(
g
.
GetG
raph
()));
(
cmaps
,
num_vertices
(
g
.
get_g
raph
()));
if
(
vprop
.
empty
())
throw
ValueException
(
"all vertex properties must be of the same"
" floating point type"
);
...
...
@@ -93,7 +93,7 @@ void extended_clustering(GraphInterface& g, boost::python::list props)
run_action
<>
()
(
g
,
std
::
bind
<
void
>
(
get_extended_clustering
(),
placeholders
::
_1
,
any_cast
<
GraphInterface
::
vertex_index_map_t
>
(
g
.
GetVertexI
ndex
()),
any_cast
<
GraphInterface
::
vertex_index_map_t
>
(
g
.
get_vertex_i
ndex
()),
placeholders
::
_2
),
properties_vector
())
(
vprop
);
}
src/graph/clustering/graph_motifs.cc
View file @
9dc8c691
...
...
@@ -70,7 +70,7 @@ void get_motifs(GraphInterface& g, size_t k, boost::python::list subgraph_list,
bool
fill_list
,
rng_t
&
rng
)
{
boost
::
any
list
;
if
(
g
.
GetD
irected
())
if
(
g
.
get_d
irected
())
list
=
vector
<
d_graph_t
>
();
else
list
=
vector
<
u_graph_t
>
();
...
...
@@ -139,7 +139,7 @@ void get_motifs(GraphInterface& g, size_t k, boost::python::list subgraph_list,
{
GraphInterface
sub
;
sub
.
SetDirected
(
g
.
GetD
irected
());
sub
.
set_directed
(
g
.
get_d
irected
());
typedef
graph_tool
::
detail
::
get_all_graph_views
::
apply
<
graph_tool
::
detail
::
filt_scalar_type
,
boost
::
mpl
::
bool_
<
false
>
,
boost
::
mpl
::
bool_
<
false
>
,
...
...
src/graph/community/graph_blockmodel.cc
View file @
9dc8c691
...
...
@@ -179,16 +179,16 @@ boost::any do_create_emat(GraphInterface& gi, boost::any ob,
vmap_t
;
vmap_t
b
=
any_cast
<
vmap_t
>
(
ob
);
if
(
gi
.
GetD
irected
())
if
(
gi
.
get_d
irected
())
{
run_action
<>
()(
gi
,
std
::
bind
<
void
>
(
create_emat
(),
placeholders
::
_1
,
std
::
ref
(
b
),
std
::
ref
(
bgi
.
GetG
raph
()),
std
::
ref
(
bgi
.
get_g
raph
()),
std
::
ref
(
emat
)))();
}
else
{
UndirectedAdaptor
<
GraphInterface
::
multigraph_t
>
ug
(
bgi
.
GetG
raph
());
UndirectedAdaptor
<
GraphInterface
::
multigraph_t
>
ug
(
bgi
.
get_g
raph
());
run_action
<>
()(
gi
,
std
::
bind
<
void
>
(
create_emat
(),
placeholders
::
_1
,
std
::
ref
(
b
),
std
::
ref
(
ug
),
...
...
@@ -206,17 +206,17 @@ boost::any do_create_ehash(GraphInterface& gi, boost::any ob,
vmap_t
;
vmap_t
b
=
any_cast
<
vmap_t
>
(
ob
);
if
(
gi
.
GetD
irected
())
if
(
gi
.
get_d
irected
())
{
run_action
<>
()(
gi
,
std
::
bind
<
void
>
(
create_ehash
(),
placeholders
::
_1
,
std
::
ref
(
b
),
std
::
ref
(
bgi
.
GetG
raph
()),
std
::
ref
(
bgi
.
get_g
raph
()),
std
::
ref
(
emat
),
std
::
ref
(
rng
)))();
}
else
{
UndirectedAdaptor
<
GraphInterface
::
multigraph_t
>
ug
(
bgi
.
GetG
raph
());
UndirectedAdaptor
<
GraphInterface
::
multigraph_t
>
ug
(
bgi
.
get_g
raph
());
run_action
<>
()(
gi
,
std
::
bind
<
void
>
(
create_ehash
(),
placeholders
::
_1
,
std
::
ref
(
b
),
std
::
ref
(
ug
),
...
...
@@ -293,11 +293,11 @@ struct move_sweep_dispatch
if
(
is_directed
::
apply
<
Graph
>::
type
::
value
)
{
dispatch
(
mrs
,
mrp
,
mrm
,
wr
,
b
,
g
,
emat
,
sampler
,
cavity_sampler
,
bgi
.
GetG
raph
(),
weighted
);
bgi
.
get_g
raph
(),
weighted
);
}
else
{
UndirectedAdaptor
<
GraphInterface
::
multigraph_t
>
ug
(
bgi
.
GetG
raph
());
UndirectedAdaptor
<
GraphInterface
::
multigraph_t
>
ug
(
bgi
.
get_g
raph
());
dispatch
(
mrs
,
mrp
,
mrm
,
wr
,
b
,
g
,
emat
,
sampler
,
cavity_sampler
,
ug
,
weighted
);
}
...
...
@@ -489,7 +489,7 @@ boost::python::object do_move_sweep(GraphInterface& gi, GraphInterface& bgi,
label
,
vlist
,
block_list
,
target_list
,
deg_corr
,
dense
,
multigraph
,
beta
,
sequential
,
parallel
,
random_move
,
c
,
verbose
,
gi
.
GetMaxEdgeI
ndex
(),
nmerges
,
niter
,
merge_map
,
gi
.
get_max_edge_i
ndex
(),
nmerges
,
niter
,
merge_map
,
partition_stats
,
rng
,
S
,
nmoves
,
bgi
),
mrs
,
mrp
,
mrm
,
wr
,
b
,
placeholders
::
_1
,
std
::
ref
(
emat
),
sampler
,
cavity_sampler
,
weighted
))();
...
...
@@ -531,11 +531,11 @@ boost::any do_build_egroups(GraphInterface& gi, GraphInterface& bgi,
boost
::
any
oegroups
;
run_action
<
graph_tool
::
detail
::
all_graph_views
,
boost
::
mpl
::
true_
>
()
(
gi
,
std
::
bind
<
void
>
(
build_egroups
(),
b
,
std
::
ref
(
oegroups
),
esrcpos
.
get_unchecked
(
gi
.
GetMaxEdgeI
ndex
()),
etgtpos
.
get_unchecked
(
gi
.
GetMaxEdgeI
ndex
()),
eweights
.
get_unchecked
(
gi
.
GetMaxEdgeI
ndex
()),
placeholders
::
_1
,
bgi
.
GetVertexI
ndex
(),
bgi
.
GetNumberOfV
ertices
(),
weighted
,
empty
))();
esrcpos
.
get_unchecked
(
gi
.
get_max_edge_i
ndex
()),
etgtpos
.
get_unchecked
(
gi
.
get_max_edge_i
ndex
()),
eweights
.
get_unchecked
(
gi
.
get_max_edge_i
ndex
()),
placeholders
::
_1
,
bgi
.
get_vertex_i
ndex
(),
bgi
.
get_num_v
ertices
(),
weighted
,
empty
))();
return
oegroups
;
}
...
...
@@ -580,7 +580,7 @@ void do_collect_edge_marginals(GraphInterface& gi, GraphInterface& gbi,
run_action
<
graph_tool
::
detail
::
all_graph_views
,
boost
::
mpl
::
true_
>
()
(
gi
,
std
::
bind
<
void
>
(
collect_edge_marginals_dispatch
(),
placeholders
::
_1
,
B
,
b
,
p
,
std
::
tuple
<
boost
::
any
,
GraphInterface
&>
(
gbi
.
GetGraphV
iew
(),
gbi
)))();
std
::
tuple
<
boost
::
any
,
GraphInterface
&>
(
gbi
.
get_graph_v
iew
(),
gbi
)))();
}
boost
::
python
::
tuple
do_bethe_entropy
(
GraphInterface
&
gi
,
size_t
B
,
boost
::
any
op
,
...
...
src/graph/community/graph_blockmodel_covariates.cc
View file @
9dc8c691
...
...
@@ -151,13 +151,13 @@ struct cov_move_sweep_dispatch
{
vector
<
std
::
reference_wrapper
<
Graph
>>
gs
;
for
(
GraphInterface
&
ag
:
ags
)
gs
.
push_back
(
*
any_cast
<
Graph
*>
(
ag
.
GetGraphV
iew
()));
gs
.
push_back
(
*
any_cast
<
Graph
*>
(
ag
.
get_graph_v
iew
()));
if
(
is_directed
::
apply
<
Graph
>::
type
::
value
)
{
vector
<
std
::
reference_wrapper
<
GraphInterface
::
multigraph_t
>>
bgs
;
for
(
GraphInterface
&
bgi
:
bgis
)
bgs
.
push_back
(
bgi
.
GetG
raph
());
bgs
.
push_back
(
bgi
.
get_g
raph
());
dispatch
(
mrs
,
mrp
,
mrm
,
wr
,
b
,
bs
,
g
,
gs
,
emat
,
sampler
,
cavity_sampler
,
bgs
,
weighted
);
}
...
...
@@ -165,7 +165,7 @@ struct cov_move_sweep_dispatch
{
vector
<
UndirectedAdaptor
<
GraphInterface
::
multigraph_t
>>
ubgs
;
for
(
GraphInterface
&
bgi
:
bgis
)
ubgs
.
push_back
(
UndirectedAdaptor
<
GraphInterface
::
multigraph_t
>
(
bgi
.
GetG
raph
()));
ubgs
.
push_back
(
UndirectedAdaptor
<
GraphInterface
::
multigraph_t
>
(
bgi
.
get_g
raph
()));
vector
<
std
::
reference_wrapper
<
UndirectedAdaptor
<
GraphInterface
::
multigraph_t
>>>
rubgs
;
for
(
auto
&
bg
:
ubgs
)
rubgs
.
push_back
(
bg
);
...
...
@@ -577,7 +577,7 @@ boost::python::object do_cov_move_sweep(GraphInterface& gi,
vector
<
size_t
>
eidx
;
for
(
GraphInterface
&
g
:
gis
)
eidx
.
push_back
(
g
.
GetMaxEdgeI
ndex
());
eidx
.
push_back
(
g
.
get_max_edge_i
ndex
());
auto
bgi
=
from_rlist
<
GraphInterface
>
(
obgi
);
...
...
@@ -606,7 +606,7 @@ boost::python::object do_cov_move_sweep(GraphInterface& gi,
label
,
vlist
,
block_list
,
target_blocks
,
deg_corr
,
dense
,
multigraph
,
beta
,
sequential
,
parallel
,
random_move
,
node_coherent
,
confine_layers
,
c
,
verbose
,
gi
.
GetMaxEdgeI
ndex
(),
eidx
,
nmerges
,
niter
,
merge_map
,
gi
.
get_max_edge_i
ndex
(),
eidx
,
nmerges
,
niter
,
merge_map
,
partition_stats
,
overlap_partition_stats
,
overlap_stats
,
master
,
slave
,
rng
,
S
,
nmoves
,
bgi
,
bmap
,
brmap
,
free_blocks
,
B
),
std
::
ref
(
mrs
),
std
::
ref
(
mrp
),
std
::
ref
(
mrm
),
std
::
ref
(
wr
),
...
...
@@ -653,7 +653,7 @@ void do_ec_hist(GraphInterface& gi, boost::any& aevc, boost::any& aec)
GraphInterface
::
edge_index_map_t
>::
type
emap_t
;
typename
emap_t
::
unchecked_t
ec
=
any_cast
<
emap_t
&>
(
aec
).
get_unchecked
(
gi
.
GetMaxEdgeI
ndex
());
any_cast
<
emap_t
&>
(
aec
).
get_unchecked
(
gi
.
get_max_edge_i
ndex
());
run_action
<>
()(
gi
,
std
::
bind
<
void
>
(
ec_hist
(),
placeholders
::
_1
,
placeholders
::
_2
,
std
::
ref
(
ec
)),
edge_properties
())(
aevc
);
...
...
src/graph/community/graph_blockmodel_covariates.hh
View file @
9dc8c691
...
...
@@ -83,7 +83,7 @@ struct split_graph
auto
iter
=
vhmap
[
v
].
find
(
l
);
if
(
iter
==
vhmap
[
v
].
end
())
{
size_t
u
=
add_vertex
(
us
[
l
].
get
().
GetG
raph
());
size_t
u
=
add_vertex
(
us
[
l
].
get
().
get_g
raph
());
vhmap
[
v
][
l
]
=
u
;
size_t
pos
=
lower_bound
(
vc
[
v
].
begin
(),
vc
[
v
].
end
(),
l
)
-
vc
[
v
].
begin
();
vc
[
v
].
insert
(
vc
[
v
].
begin
()
+
pos
,
l
);
...
...
@@ -124,7 +124,7 @@ struct split_graph
auto
u_s
=
get_v
(
s
,
l
);
auto
u_t
=
get_v
(
t
,
l
);
auto
ne
=
add_edge
(
u_s
,
u_t
,
us
[
l
].
get
().
GetG
raph
()).
first
;
auto
ne
=
add_edge
(
u_s
,
u_t
,
us
[
l
].
get
().
get_g
raph
()).
first
;
ueweight
[
l
].
get
()[
ne
]
=
eweight
[
e
];
}
}
...
...
src/graph/community/graph_blockmodel_overlap.cc
View file @
9dc8c691
...
...
@@ -116,11 +116,11 @@ struct move_sweep_overlap_dispatch
if
(
is_directed
::
apply
<
Graph
>::
type
::
value
)
{
dispatch
(
mrs
,
mrp
,
mrm
,
wr
,
b
,
g
,
emat
,
sampler
,
cavity_sampler
,
bgi
.
GetG
raph
(),
weighted
);
bgi
.
get_g
raph
(),
weighted
);
}
else
{
UndirectedAdaptor
<
GraphInterface
::
multigraph_t
>
ug
(
bgi
.
GetG
raph
());
UndirectedAdaptor
<
GraphInterface
::
multigraph_t
>
ug
(
bgi
.
get_g
raph
());
dispatch
(
mrs
,
mrp
,
mrm
,
wr
,
b
,
g
,
emat
,
sampler
,
cavity_sampler
,
ug
,
weighted
);
}
...
...
@@ -324,7 +324,7 @@ do_move_sweep_overlap(GraphInterface& gi, GraphInterface& bgi, boost::any& emat,
(
eweight
,
vweight
,
oegroups
,
esrcpos
,
etgtpos
,
label
,
vlist
,
block_list
,
target_blocks
,
deg_corr
,
dense
,
multigraph
,
parallel_edges
,
beta
,
sequential
,
parallel
,
random_move
,
c
,
node_coherent
,
verbose
,
gi
.
GetMaxEdgeI
ndex
(),
random_move
,
c
,
node_coherent
,
verbose
,
gi
.
get_max_edge_i
ndex
(),
nmerges
,
niter
,
merge_map
,
overlap_stats
,
partition_stats
,
rng
,
S
,
nmoves
,
bgi
),
mrs
,
mrp
,
mrm
,
wr
,
b
,
placeholders
::
_1
,
...
...
@@ -476,7 +476,7 @@ void do_get_eg_overlap(GraphInterface& gi, GraphInterface& egi, boost::any obe,
emap_t
eindex
=
any_cast
<
emap_t
>
(
oeindex
);
run_action
<>
()(
gi
,
std
::
bind
(
get_eg_overlap
(),
placeholders
::
_1
,
std
::
ref
(
egi
.
GetG
raph
()),
be
,
b
,
node_index
,
std
::
ref
(
egi
.
get_g
raph
()),
be
,
b
,
node_index
,
half_edges
,
eindex
))();
}
...
...
@@ -534,7 +534,7 @@ void do_get_be_overlap(GraphInterface& gi, GraphInterface& egi, boost::any obe,
vimap_t
node_index
=
any_cast
<
vimap_t
>
(
onode_index
);
run_action
<>
()(
gi
,
std
::
bind
(
get_be_overlap
(),
placeholders
::
_1
,
std
::
ref
(
egi
.
GetG
raph
()),
be
,
b
,
std
::
ref
(
egi
.
get_g
raph
()),
be
,
b
,
node_index
))();
}
...
...
src/graph/community/graph_community.cc
View file @
9dc8c691
...
...
@@ -66,7 +66,7 @@ void community_structure(GraphInterface& g, double gamma, string corr_name,
throw
ValueException
(
"invalid correlation type: "
+
corr_name
);
run_action
<
graph_tool
::
detail
::
never_directed
>
()
(
g
,
std
::
bind
(
get_communities_selector
(
corr
,
g
.
GetVertexI
ndex
()),
(
g
,
std
::
bind
(
get_communities_selector
(
corr
,
g
.
get_vertex_i
ndex
()),
placeholders
::
_1
,
placeholders
::
_2
,
placeholders
::
_3
,
gamma
,
n_iter
,
make_pair
(
Tmin
,
Tmax
),
Nspins
,
std
::
ref
(
rng
),
make_pair
(
verbose
,
history_file
)),
...
...
src/graph/community/graph_community_network.cc
View file @
9dc8c691
...
...
@@ -101,7 +101,7 @@ void community_network(GraphInterface& gi, GraphInterface& cgi,
run_action
<>
()
(
gi
,
std
::
bind
(
get_community_network_vertices_dispatch
(),
placeholders
::
_1
,
std
::
ref
(
cgi
.
GetG
raph
()),
placeholders
::
_1
,
std
::
ref
(
cgi
.
get_g
raph
()),
placeholders
::
_2
,
condensed_community_property
,
placeholders
::
_3
,
vertex_count
),
writable_vertex_properties
(),
vweight_properties
())
...
...
src/graph/community/graph_community_network_eavg_imp1.cc
View file @
9dc8c691
...
...
@@ -68,7 +68,7 @@ void sum_eprops(GraphInterface& gi, GraphInterface& cgi,
run_action
<
graph_tool
::
detail
::
always_directed
>
()
(
gi
,
std
::
bind
(
get_edge_sum_dispatch
(),
placeholders
::
_1
,
std
::
ref
(
cgi
.
GetG
raph
()),
placeholders
::
_1
,
std
::
ref
(
cgi
.
get_g
raph
()),
placeholders
::
_2
,
condensed_community_property
,
placeholders
::
_3
,
ceprop
,
self_loops
),
...
...
src/graph/community/graph_community_network_edges.cc
View file @
9dc8c691
...
...
@@ -76,7 +76,7 @@ void community_network_edges(GraphInterface& gi, GraphInterface& cgi,
run_action
<>
()
(
gi
,
std
::
bind
(
get_community_network_edges_dispatch
(
self_loops
,
parallel_edges
),
placeholders
::
_1
,
std
::
ref
(
cgi
.
GetGraph
()),
cgi
.
GetEdgeI
ndex
(),
placeholders
::
_1
,
std
::
ref
(
cgi
.
get_graph
()),
cgi
.
get_edge_i
ndex
(),
placeholders
::
_2
,
condensed_community_property
,
placeholders
::
_3
,
edge_count
),
writable_vertex_properties
(),
eweight_properties
())
...
...
src/graph/community/graph_community_network_vavg.cc
View file @
9dc8c691
...
...
@@ -107,7 +107,7 @@ void community_network_vavg(GraphInterface& gi, GraphInterface& cgi,
// sum weighted values
run_action
<
graph_tool
::
detail
::
always_directed_never_reversed
>
()
(
gi
,
std
::
bind
(
get_vertex_sum_dispatch
(),
placeholders
::
_1
,
std
::
ref
(
cgi
.
GetG
raph
()),
placeholders
::
_1
,
std
::
ref
(
cgi
.
get_g
raph
()),
placeholders
::
_2
,
condensed_community_property
,
placeholders
::
_3
,
cvprop
),
...
...
@@ -119,7 +119,7 @@ void community_network_vavg(GraphInterface& gi, GraphInterface& cgi,
// sum unweighted values
run_action
<
graph_tool
::
detail
::
always_directed_never_reversed
>
()
(
gi
,
std
::
bind
(
get_vertex_sum_dispatch
(),
placeholders
::
_1
,
std
::
ref
(
cgi
.
GetG
raph
()),
placeholders
::
_1
,
std
::
ref
(
cgi
.
get_g
raph
()),
placeholders
::
_2
,
condensed_community_property
,
placeholders
::
_3
,
cvprop
),
...
...
src/graph/correlations/graph_avg_correlations.hh
View file @
9dc8c691
...
...
@@ -75,25 +75,25 @@ struct get_avg_correlation
continue
;
put_point
(
v
,
deg1
,
deg2
,
g
,
weight
,
s_sum
,
s_sum2
,
s_count
);
}
s_sum
.
G
ather
();
s_sum2
.
G
ather
();
s_count
.
G
ather
();
s_sum
.
g
ather
();
s_sum2
.
g
ather
();
s_count
.
g
ather
();
for
(
i
=
0
;
i
<
int
(
sum
.
GetA
rray
().
size
());
++
i
)
for
(
i
=
0
;
i
<
int
(
sum
.
get_a
rray
().
size
());
++
i
)
{
sum
.
GetArray
()[
i
]
/=
count
.
GetA
rray
()[
i
];
sum2
.
GetA
rray
()[
i
]
=
sqrt
(
abs
(
sum2
.
GetArray
()[
i
]
/
count
.
GetA
rray
()[
i
]
-
sum
.
GetArray
()[
i
]
*
sum
.
GetA
rray
()[
i
]))
/
sqrt
(
count
.
GetA
rray
()[
i
]);
sum
.
get_array
()[
i
]
/=
count
.
get_a
rray
()[
i
];
sum2
.
get_a
rray
()[
i
]
=
sqrt
(
abs
(
sum2
.
get_array
()[
i
]
/
count
.
get_a
rray
()[
i
]
-
sum
.
get_array
()[
i
]
*
sum
.
get_a
rray
()[
i
]))
/
sqrt
(
count
.
get_a
rray
()[
i
]);
}
bins
=
sum
.
GetB
ins
();
bins
=
sum
.
get_b
ins
();
python
::
list
ret_bins
;
ret_bins
.
append
(
wrap_vector_owned
(
bins
[
0
]));
_ret_bins
=
ret_bins
;
_avg
=
wrap_multi_array_owned
<
avg_type
,
1
>
(
sum
.
GetA
rray
());
_dev
=
wrap_multi_array_owned
<
avg_type
,
1
>
(
sum2
.
GetA
rray
());
_avg
=
wrap_multi_array_owned
<
avg_type
,
1
>
(
sum
.
get_a
rray
());
_dev
=
wrap_multi_array_owned
<
avg_type
,
1
>
(
sum2
.
get_a
rray
());
}
python
::
object
&
_avg
;
python
::
object
&
_dev
;
...
...
src/graph/correlations/graph_corr_hist.hh
View file @
9dc8c691
...
...
@@ -71,12 +71,12 @@ struct get_correlation_histogram
}
}
bins
=
hist
.
GetB
ins
();
bins
=
hist
.
get_b
ins
();
python
::
list
ret_bins
;
ret_bins
.
append
(
wrap_vector_owned
(
bins
[
0
]));
ret_bins
.
append
(
wrap_vector_owned
(
bins
[
1
]));
_ret_bins
=
ret_bins
;
_hist
=
wrap_multi_array_owned
<
count_type
,
2
>
(
hist
.
GetA
rray
());
_hist
=
wrap_multi_array_owned
<
count_type
,
2
>
(
hist
.
get_a
rray
());
}
python
::
object
&
_hist
;
const
std
::
array
<
vector
<
long
double
>
,
2
>&
_bins
;
...
...
src/graph/correlations/graph_correlations.hh
View file @
9dc8c691
...
...
@@ -50,7 +50,7 @@ public:
for
(
tie
(
e
,
e_end
)
=
out_edges
(
v
,
g
);
e
!=
e_end
;
++
e
)
{
k
[
1
]
=
deg2
(
target
(
*
e
,
g
),
g
);
hist
.
PutV
alue
(
k
,
get
(
weight
,
*
e
));
hist
.
put_v
alue
(
k
,
get
(
weight
,
*
e
));
}
}
...
...
@@ -67,9 +67,9 @@ public:
for
(
tie
(
e
,
e_end
)
=
out_edges
(
v
,
g
);
e
!=
e_end
;
++
e
)
{
k2
=
deg2
(
target
(
*
e
,
g
),
g
)
*
get
(
weight
,
*
e
);
sum
.
PutV
alue
(
k1
,
k2
);
sum2
.
PutV
alue
(
k1
,
k2
*
k2
);
count
.
PutV
alue
(
k1
,
get
(
weight
,
*
e
));
sum
.
put_v
alue
(
k1
,
k2
);
sum2
.
put_v
alue
(
k1
,
k2
*
k2
);
count
.
put_v
alue
(
k1
,
get
(
weight
,
*
e
));
}
}
};
...
...
@@ -87,7 +87,7 @@ public:
typename
Hist
::
point_t
k
;
k
[
0
]
=
deg1
(
v
,
g
);
k
[
1
]
=
deg2
(
v
,
g
);
hist
.
PutV
alue
(
k
);
hist
.
put_v
alue
(
k
);
}
template
<
class
Graph
,
class
Deg1
,
class
Deg2
,
class
Sum
,
class
Count
,
...
...
@@ -100,9 +100,9 @@ public:
k1
[
0
]
=
deg1
(
v
,
g
);
typename
Sum
::
count_type
k2
;
k2
=
deg2
(
v
,
g
);
sum
.
PutV
alue
(
k1
,
k2
);
sum2
.
PutV
alue
(
k1
,
k2
*
k2
);
count
.
PutV
alue
(
k1
,
1
);
sum
.
put_v
alue
(
k1
,
k2
);
sum2
.
put_v
alue
(
k1
,
k2
*
k2
);
count
.
put_v
alue
(
k1
,
1
);
}
};
...
...
src/graph/draw/graph_tree_cts.cc
View file @
9dc8c691
...
...
@@ -264,5 +264,5 @@ void get_cts(GraphInterface& gi, GraphInterface& tgi, boost::any otpos,
placeholders
::
_3
,
beta
,
cts
,
is_tree
,
max_depth
),
get_pointers
::
apply
<
graph_tool
::
detail
::
always_directed
>::
type
(),
vertex_scalar_vector_properties
())
(
tgi
.
GetGraphV
iew
(),
otpos
);
(
tgi
.
get_graph_v
iew
(),
otpos
);
}
src/graph/flow/graph_edmonds_karp.cc
View file @
9dc8c691
...
...
@@ -70,8 +70,8 @@ void edmonds_karp_max_flow(GraphInterface& gi, size_t src, size_t sink,
{
run_action
<
graph_tool
::
detail
::
always_directed
>
()
(
gi
,
std
::
bind
(
get_edmonds_karp_max_flow
(),
placeholders
::
_1
,
gi
.
GetVertexIndex
(),
gi
.
GetEdgeI
ndex
(),
gi
.
GetMaxEdgeI
ndex
(),
placeholders