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
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
88ab00bd
Commit
88ab00bd
authored
Mar 11, 2012
by
Tiago Peixoto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Trivial whitespace fixups
parent
48f1b2e9
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
16 deletions
+11
-16
src/graph/generation/graph_rewiring.hh
src/graph/generation/graph_rewiring.hh
+9
-10
src/graph/graph.hh
src/graph/graph.hh
+0
-3
src/graph/layout/graph_arf.cc
src/graph/layout/graph_arf.cc
+0
-1
src/graph/topology/graph_similarity.hh
src/graph/topology/graph_similarity.hh
+2
-2
No files found.
src/graph/generation/graph_rewiring.hh
View file @
88ab00bd
...
...
@@ -196,7 +196,6 @@ struct graph_rewire
edges
.
push_back
(
*
e
);
edge_pos
.
push_back
(
edge_pos
.
size
());
}
RewireStrategy
<
Graph
,
EdgeIndexMap
,
CorrProb
,
BlockDeg
>
rewire
(
g
,
edge_index
,
edges
,
corr_prob
,
bd
,
rng
);
...
...
@@ -210,7 +209,7 @@ struct graph_rewire
stringstream
str
;
for
(
size_t
i
=
0
;
i
<
niter
;
++
i
)
{
random_edge_iter
random_edge_iter
ei_begin
(
edge_pos
.
begin
(),
edge_pos
.
end
(),
rng
),
ei_end
(
edge_pos
.
end
(),
edge_pos
.
end
(),
rng
);
...
...
@@ -352,7 +351,7 @@ public:
{
self
.
update_edge
(
ei
,
false
);
self
.
update_edge
(
et
.
first
,
false
);
swap_edge
::
swap_target
(
ei
,
et
,
_edges
,
_edge_index
,
_g
);
self
.
update_edge
(
ei
,
true
);
...
...
@@ -362,7 +361,7 @@ public:
{
return
false
;
}
return
true
;
}
...
...
@@ -550,7 +549,7 @@ public:
{
deg_t
s_deg
=
get_deg
(
source
(
base_t
::
_edges
[
ei
],
_g
),
_g
);
deg_t
t_deg
=
get_deg
(
target
(
base_t
::
_edges
[
ei
],
_g
),
_g
);
tr1
::
uniform_int
<>
sample
(
0
,
base_t
::
_edges
.
size
()
-
1
);
size_t
epi
=
sample
(
base_t
::
_rng
);
pair
<
size_t
,
bool
>
ep
=
make_pair
(
epi
,
false
);
...
...
@@ -568,15 +567,15 @@ public:
_probs
[
make_pair
(
ep_s_deg
,
ep_t_deg
)]);
double
pf
=
(
_probs
[
make_pair
(
s_deg
,
ep_t_deg
)]
*
_probs
[
make_pair
(
ep_s_deg
,
t_deg
)]);
if
(
pf
>=
pi
)
return
ep
;
if
(
pf
==
0
)
return
make_pair
(
ei
,
false
);
// reject
double
a
=
exp
(
log
(
pf
)
-
log
(
pi
));
tr1
::
variate_generator
<
rng_t
&
,
tr1
::
uniform_real
<>
>
rsample
(
base_t
::
_rng
,
tr1
::
uniform_real
<>
(
0.0
,
1.0
));
double
r
=
rsample
();
...
...
@@ -601,7 +600,7 @@ class DegreeBlock
{
public:
typedef
pair
<
size_t
,
size_t
>
block_t
;
template
<
class
Graph
>
block_t
get_block
(
typename
graph_traits
<
Graph
>::
vertex_descriptor
v
,
const
Graph
&
g
)
const
...
...
@@ -616,7 +615,7 @@ class PropertyBlock
{
public:
typedef
typename
property_traits
<
PropertyMap
>::
value_type
block_t
;
PropertyBlock
(
PropertyMap
p
)
:
_p
(
p
)
{}
template
<
class
Graph
>
...
...
src/graph/graph.hh
View file @
88ab00bd
...
...
@@ -215,6 +215,3 @@ private:
}
//namespace graph_tool
#endif
src/graph/layout/graph_arf.cc
View file @
88ab00bd
...
...
@@ -37,7 +37,6 @@ void arf_layout(GraphInterface& g, boost::any pos, boost::any weight, double d,
if
(
weight
.
empty
())
weight
=
weight_map_t
(
1
);
run_action
<
graph_tool
::
detail
::
never_directed
>
()
(
g
,
lambda
::
bind
<
void
>
(
get_arf_layout
(),
lambda
::
_1
,
lambda
::
_2
,
...
...
src/graph/topology/graph_similarity.hh
View file @
88ab00bd
...
...
@@ -52,7 +52,7 @@ struct get_similarity
const
Graph2
&
g2
=
*
g2p
;
typedef
typename
property_traits
<
LabelMap
>::
value_type
label_t
;
tr1
::
unordered_map
<
label_t
,
typename
graph_traits
<
Graph1
>::
vertex_descriptor
>
lmap1
;
tr1
::
unordered_map
<
label_t
,
typename
graph_traits
<
Graph2
>::
vertex_descriptor
>
...
...
@@ -85,7 +85,7 @@ struct get_similarity
adj1
.
insert
(
get
(
l1
,
*
a1
));
keys
.
insert
(
get
(
l1
,
*
a1
));
}
typename
graph_traits
<
Graph2
>::
adjacency_iterator
a2
,
a2_end
;
for
(
tie
(
a2
,
a2_end
)
=
adjacent_vertices
(
v2
,
g2
);
a2
!=
a2_end
;
++
a2
)
{
...
...
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