diff --git a/doc/metrics/pgr_betweennessCentrality.rst b/doc/metrics/pgr_betweennessCentrality.rst index 8d18983f69..bc6c8c7d8b 100644 --- a/doc/metrics/pgr_betweennessCentrality.rst +++ b/doc/metrics/pgr_betweennessCentrality.rst @@ -47,9 +47,9 @@ Signatures .. TODO: Fix this when docqueries are made :Example: For a directed subgraph with edges :math:`\{1, 2, 3, 4\}`. -.. literalinclude:: floydWarshall.queries +.. literalinclude:: betweennessCentrality.queries :start-after: -- q1 - :end-before: -- q2 + :end-before: Implicit Cases (directed) Parameters ------------------------------------------------------------------------------- diff --git a/docqueries/metrics/betweennessCentrality.pg b/docqueries/metrics/betweennessCentrality.pg index 4b90742f48..5da460aceb 100644 --- a/docqueries/metrics/betweennessCentrality.pg +++ b/docqueries/metrics/betweennessCentrality.pg @@ -1,6 +1,11 @@ -- CopyRight(c) pgRouting developers -- Creative Commons Attribution-Share Alike 3.0 License : https://creativecommons.org/licenses/by-sa/3.0/ +/* -- q1 */ +SELECT * FROM pgr_betweennessCentrality( +'SELECT id, source, target, cost, reverse_cost +FROM edges where id < 5' +) ORDER BY vid; /* Implicit Cases (directed) */ SELECT * FROM pgr_betweennessCentrality( 'SELECT id, source, target, cost, reverse_cost diff --git a/docqueries/metrics/betweennessCentrality.result b/docqueries/metrics/betweennessCentrality.result index 27950e4a2f..c9b642e94f 100644 --- a/docqueries/metrics/betweennessCentrality.result +++ b/docqueries/metrics/betweennessCentrality.result @@ -2,6 +2,20 @@ BEGIN; BEGIN SET client_min_messages TO NOTICE; SET +/* -- q1 */ +SELECT * FROM pgr_betweennessCentrality( + 'SELECT id, source, target, cost, reverse_cost + FROM edges where id < 5' +) ORDER BY vid; + vid | centrality +-----+------------ + 5 | 0 + 6 | 0.5 + 7 | 0 + 10 | 0.25 + 15 | 0 +(5 rows) + /* Implicit Cases (directed) */ SELECT * FROM pgr_betweennessCentrality( 'SELECT id, source, target, cost, reverse_cost