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
41e8c3fe
Commit
41e8c3fe
authored
Jul 16, 2015
by
Tiago Peixoto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replace gt_hash_map by unordered_map for std::string and other generic keys
parent
b8fe4467
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
28 additions
and
29 deletions
+28
-29
src/graph/community/graph_blockmodel_covariates.hh
src/graph/community/graph_blockmodel_covariates.hh
+1
-1
src/graph/community/graph_community_network.hh
src/graph/community/graph_community_network.hh
+5
-5
src/graph/generation/graph_rewiring.hh
src/graph/generation/graph_rewiring.hh
+13
-13
src/graph/generation/graph_triangulation.hh
src/graph/generation/graph_triangulation.hh
+1
-1
src/graph/graph_properties.cc
src/graph/graph_properties.cc
+3
-3
src/graph/graph_properties.hh
src/graph/graph_properties.hh
+1
-1
src/graph/hash_map_wrap.hh
src/graph/hash_map_wrap.hh
+0
-1
src/graph/topology/graph_similarity.hh
src/graph/topology/graph_similarity.hh
+4
-4
No files found.
src/graph/community/graph_blockmodel_covariates.hh
View file @
41e8c3fe
...
...
@@ -42,7 +42,7 @@ struct ec_hist
void
operator
()(
Graph
&
g
,
const
EVMap
&
ev
,
EMap
&
ec
)
const
{
typedef
typename
property_traits
<
EVMap
>::
value_type
val_t
;
gt_hash
_map
<
val_t
,
size_t
>
ehist
;
unordered
_map
<
val_t
,
size_t
>
ehist
;
for
(
auto
e
:
edges_range
(
g
))
{
auto
iter
=
ehist
.
find
(
ev
[
e
]);
...
...
src/graph/community/graph_community_network.hh
View file @
41e8c3fe
...
...
@@ -46,7 +46,7 @@ struct get_community_network_vertices
typedef
typename
boost
::
property_traits
<
CommunityMap
>::
value_type
s_type
;
gt_hash_map
<
s_type
,
vertex_t
,
std
::
hash
<
s_type
>
>
comms
;
unordered_map
<
s_type
,
vertex_t
>
comms
;
// create vertices
for
(
auto
vi
:
vertices_range
(
g
))
...
...
@@ -107,9 +107,9 @@ struct get_community_network_edges
typedef
typename
boost
::
property_traits
<
CommunityMap
>::
value_type
s_type
;
typedef
gt_hash_map
<
s_type
,
vertex_t
,
std
::
hash
<
s_type
>
>
comms_t
;
typedef
unordered_map
<
s_type
,
vertex_t
>
comms_t
;
comms_t
comms
;
typedef
gt_hash
_map
<
cvertex_t
,
cedge_t
>
ecomms_t
;
typedef
unordered
_map
<
cvertex_t
,
cedge_t
>
ecomms_t
;
auto
index_map
=
get
(
vertex_index_t
(),
cg
);
unchecked_vector_property_map
<
ecomms_t
,
decltype
(
index_map
)
>
...
...
@@ -234,7 +234,7 @@ struct get_vertex_community_property_sum
typedef
typename
boost
::
property_traits
<
CommunityMap
>::
value_type
s_type
;
gt_hash
_map
<
s_type
,
vertex_t
>
comms
;
unordered
_map
<
s_type
,
vertex_t
>
comms
;
for
(
auto
v
:
vertices_range
(
cg
))
comms
[
cs_map
[
v
]]
=
v
;
...
...
@@ -274,7 +274,7 @@ struct get_edge_community_property_sum
typedef
typename
boost
::
property_traits
<
CommunityMap
>::
value_type
s_type
;
gt_hash
_map
<
s_type
,
vertex_t
>
comms
;
unordered
_map
<
s_type
,
vertex_t
>
comms
;
for
(
auto
v
:
vertices_range
(
cg
))
comms
[
cs_map
[
v
]]
=
v
;
...
...
src/graph/generation/graph_rewiring.hh
View file @
41e8c3fe
...
...
@@ -643,8 +643,8 @@ public:
private:
BlockDeg
_blockdeg
;
typedef
gt_hash
_map
<
deg_t
,
vector
<
pair
<
size_t
,
bool
>>>
typedef
std
::
unordered
_map
<
deg_t
,
vector
<
pair
<
size_t
,
bool
>>>
edges_by_end_deg_t
;
edges_by_end_deg_t
_edges_by_target
;
...
...
@@ -691,7 +691,7 @@ public:
if
(
_probs
.
empty
())
{
gt_hash
_set
<
deg_t
>
deg_set
;
std
::
unordered
_set
<
deg_t
>
deg_set
;
for
(
size_t
ei
=
0
;
ei
<
base_t
::
_edges
.
size
();
++
ei
)
{
edge_t
&
e
=
base_t
::
_edges
[
ei
];
...
...
@@ -790,7 +790,7 @@ private:
BlockDeg
_blockdeg
;
typedef
gt_hash
_map
<
pair
<
deg_t
,
deg_t
>
,
double
>
prob_map_t
;
typedef
std
::
unordered
_map
<
pair
<
deg_t
,
deg_t
>
,
double
>
prob_map_t
;
prob_map_t
_probs
;
};
...
...
@@ -829,7 +829,7 @@ public:
if
(
!
is_directed
::
apply
<
Graph
>::
type
::
value
)
_out_pos
.
resize
(
base_t
::
_edges
.
size
());
gt_hash
_set
<
deg_t
>
deg_set
;
std
::
unordered
_set
<
deg_t
>
deg_set
;
for
(
size_t
ei
=
0
;
ei
<
base_t
::
_edges
.
size
();
++
ei
)
{
edge_t
&
e
=
base_t
::
_edges
[
ei
];
...
...
@@ -893,8 +893,8 @@ public:
}
else
{
gt_hash
_map
<
deg_t
,
vector
<
double
>>
sprobs
;
gt_hash
_map
<
deg_t
,
vector
<
deg_t
>>
sitems
;
std
::
unordered
_map
<
deg_t
,
vector
<
double
>>
sprobs
;
std
::
unordered
_map
<
deg_t
,
vector
<
deg_t
>>
sitems
;
for
(
auto
iter
=
_probs
.
begin
();
iter
!=
_probs
.
end
();
++
iter
)
{
deg_t
s
=
iter
->
first
.
first
;
...
...
@@ -1126,19 +1126,19 @@ private:
CorrProb
_corr_prob
;
BlockDeg
_blockdeg
;
typedef
gt_hash
_map
<
deg_t
,
Sampler
<
deg_t
,
boost
::
mpl
::
false_
>*>
sampler_map_t
;
typedef
std
::
unordered
_map
<
deg_t
,
Sampler
<
deg_t
,
boost
::
mpl
::
false_
>*>
sampler_map_t
;
sampler_map_t
_sampler
;
typedef
gt_hash_map
<
deg_t
,
gt_hash
_map
<
deg_t
,
double
>>
sprob_map_t
;
typedef
std
::
unordered_map
<
deg_t
,
std
::
unordered
_map
<
deg_t
,
double
>>
sprob_map_t
;
sprob_map_t
_sprob
;
typedef
gt_hash
_map
<
pair
<
deg_t
,
deg_t
>
,
double
>
prob_map_t
;
typedef
std
::
unordered
_map
<
pair
<
deg_t
,
deg_t
>
,
double
>
prob_map_t
;
prob_map_t
_probs
;
typedef
gt_hash
_map
<
deg_t
,
vector
<
size_t
>>
edge_map_t
;
typedef
std
::
unordered
_map
<
deg_t
,
vector
<
size_t
>>
edge_map_t
;
edge_map_t
_in_edges
;
edge_map_t
_out_edges
;
...
...
@@ -1173,7 +1173,7 @@ public:
_vertices
[
d
].
push_back
(
*
v
);
}
gt_hash
_map
<
pair
<
deg_t
,
deg_t
>
,
double
>
probs
;
std
::
unordered
_map
<
pair
<
deg_t
,
deg_t
>
,
double
>
probs
;
_corr_prob
.
get_probs
(
probs
);
vector
<
double
>
dprobs
;
...
...
@@ -1265,7 +1265,7 @@ private:
BlockDeg
_blockdeg
;
rng_t
&
_rng
;
gt_hash
_map
<
deg_t
,
vector
<
vertex_t
>>
_vertices
;
std
::
unordered
_map
<
deg_t
,
vector
<
vertex_t
>>
_vertices
;
vector
<
pair
<
deg_t
,
deg_t
>
>
_items
;
Sampler
<
pair
<
deg_t
,
deg_t
>
>*
_sampler
;
...
...
src/graph/generation/graph_triangulation.hh
View file @
41e8c3fe
...
...
@@ -106,7 +106,7 @@ struct get_triangulation
template
<
class
Graph
,
class
Points
,
class
PosMap
>
void
operator
()(
Graph
&
g
,
Points
&
points
,
PosMap
pos
)
const
{
typedef
gt_hash
_map
typedef
std
::
unordered
_map
<
typename
Triang
::
Vertex
,
typename
graph_traits
<
Graph
>::
vertex_descriptor
,
hash_point
>
vertex_map_t
;
...
...
src/graph/graph_properties.cc
View file @
41e8c3fe
...
...
@@ -162,7 +162,7 @@ struct do_infect_vertex_property
typedef
typename
property_traits
<
PropertyMap
>::
value_type
val_t
;
bool
all
=
false
;
gt_hash
_set
<
val_t
>
vals
;
std
::
unordered
_set
<
val_t
>
vals
;
if
(
oval
==
boost
::
python
::
object
())
{
all
=
true
;
...
...
@@ -263,7 +263,7 @@ struct do_perfect_vhash
{
typedef
typename
property_traits
<
VertexPropertyMap
>::
value_type
val_t
;
typedef
typename
property_traits
<
HashProp
>::
value_type
hash_t
;
typedef
gt_hash
_map
<
val_t
,
hash_t
>
dict_t
;
typedef
unordered
_map
<
val_t
,
hash_t
>
dict_t
;
if
(
adict
.
empty
())
adict
=
dict_t
();
...
...
@@ -302,7 +302,7 @@ struct do_perfect_ehash
{
typedef
typename
property_traits
<
EdgePropertyMap
>::
value_type
val_t
;
typedef
typename
property_traits
<
HashProp
>::
value_type
hash_t
;
typedef
gt_hash
_map
<
val_t
,
hash_t
>
dict_t
;
typedef
unordered
_map
<
val_t
,
hash_t
>
dict_t
;
if
(
adict
.
empty
())
adict
=
dict_t
();
...
...
src/graph/graph_properties.hh
View file @
41e8c3fe
...
...
@@ -527,7 +527,7 @@ class HashedDescriptorMap
{
public:
typedef
DescriptorHash
<
IndexMap
>
hashfc_t
;
typedef
gt_hash
_map
<
typename
IndexMap
::
key_type
,
Value
,
hashfc_t
>
typedef
unordered
_map
<
typename
IndexMap
::
key_type
,
Value
,
hashfc_t
>
map_t
;
typedef
boost
::
associative_property_map
<
map_t
>
prop_map_t
;
...
...
src/graph/hash_map_wrap.hh
View file @
41e8c3fe
...
...
@@ -300,5 +300,4 @@ public:
};
#endif // HASH_MAP_WRAP_HH
src/graph/topology/graph_similarity.hh
View file @
41e8c3fe
...
...
@@ -52,9 +52,9 @@ struct get_similarity
typedef
typename
property_traits
<
LabelMap
>::
value_type
label_t
;
gt_hash
_map
<
label_t
,
typename
graph_traits
<
Graph1
>::
vertex_descriptor
>
std
::
unordered
_map
<
label_t
,
typename
graph_traits
<
Graph1
>::
vertex_descriptor
>
lmap1
;
gt_hash
_map
<
label_t
,
typename
graph_traits
<
Graph2
>::
vertex_descriptor
>
std
::
unordered
_map
<
label_t
,
typename
graph_traits
<
Graph2
>::
vertex_descriptor
>
lmap2
;
for
(
auto
v
:
vertices_range
(
g1
))
...
...
@@ -72,7 +72,7 @@ struct get_similarity
continue
;
auto
v2
=
li2
->
second
;
gt_hash
_set
<
label_t
>
keys
;
std
::
unordered
_set
<
label_t
>
keys
;
std
::
unordered_multiset
<
label_t
>
adj1
;
std
::
unordered_multiset
<
label_t
>
adj2
;
...
...
@@ -134,7 +134,7 @@ struct get_similarity_fast
auto
v1
=
lmap1
[
i
];
auto
v2
=
lmap2
[
i
];
gt_hash
_set
<
label_t
>
keys
;
std
::
unordered
_set
<
label_t
>
keys
;
std
::
unordered_multiset
<
label_t
>
adj1
;
std
::
unordered_multiset
<
label_t
>
adj2
;
...
...
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