Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Tiago Peixoto
graph-tool
Commits
5c935bdd
Commit
5c935bdd
authored
Nov 09, 2009
by
Tiago Peixoto
Browse files
Fix problem with filtered graph in absolute_trust()
parent
1a3d219f
Changes
2
Show whitespace changes
Inline
Side-by-side
src/graph/centrality/graph_absolute_trust.hh
View file @
5c935bdd
...
...
@@ -119,6 +119,7 @@ struct get_absolute_trust
size_t
bi
=
final_queue
.
bottom
();
final_queue
.
pop_bottom
();
// do not augment if the path is the removed bottom
if
(
bi
==
pi
)
continue
;
}
...
...
@@ -152,7 +153,8 @@ struct get_absolute_trust
get
<
0
>
(
np
).
first
*=
c
[
*
e
];
}
weight_sum
[
a
]
+=
get
<
0
>
(
np
).
second
;
t
[
v
][
a
]
+=
get
<
0
>
(
np
).
second
*
get
<
0
>
(
np
).
first
;
t
[
v
][
vertex_index
[
a
]]
+=
get
<
0
>
(
np
).
second
*
get
<
0
>
(
np
).
first
;
get
<
1
>
(
np
).
insert
(
a
);
get
<
2
>
(
np
).
push_back
(
*
e
);
...
...
src/graph_tool/centrality/__init__.py
View file @
5c935bdd
...
...
@@ -536,7 +536,8 @@ def absolute_trust(g, trust_map, source = None, vprop=None, n_paths=10000,
g
.
pop_filter
(
reversed
=
True
)
if
source
!=
-
1
:
vprop_temp
.
a
=
numpy
.
array
(
vprop
[
g
.
vertex
(
source
)])
n
=
len
(
vprop
[
g
.
vertex
(
source
)])
vprop_temp
.
a
[:
n
]
=
numpy
.
array
(
vprop
[
g
.
vertex
(
source
)])
vprop
=
vprop_temp
return
vprop
...
...
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